Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c45505
commit 336a34b
Showing
45 changed files
with
246 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
Package: RchivalTag | ||
Type: Package | ||
Title: Analyzing Archival Tagging Data | ||
Version: 0.0.5 | ||
Date: 2017-06-08 | ||
Version: 0.0.7 | ||
Date: 2018-05-25 | ||
Author: Robert Bauer | ||
Maintainer: Robert Bauer <robert.bauer@ird.fr> | ||
Maintainer: Robert Bauer <r.bauer@profish-technology.de> | ||
Description: A set of functions to generate, access and analyze standard data products from archival tagging data. | ||
Depends: R (>= 3.0.1) | ||
Imports: plyr, akima, maptools, graphics, stats, raster, rgeos, ncdf4, | ||
maps, mapdata, grDevices, oceanmap, sp, methods, PBSmapping | ||
License: CC BY-NC-SA 4.0 | ||
Imports: plyr, maptools, graphics, stats, raster, rgeos, ncdf4, maps, | ||
mapdata, grDevices, oceanmap, sp, methods, PBSmapping | ||
License: GPL (>= 3) | ||
LazyLoad: yes | ||
Packaged: 2017-06-08 14:45:25 UTC; robert | ||
Packaged: 2018-05-29 20:13:18 UTC; robert | ||
Repository: CRAN | ||
Date/Publication: 2017-06-08 15:08:22 UTC | ||
Date/Publication: 2018-05-29 21:17:56 UTC | ||
NeedsCompilation: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
resample_TS <- function(df, tstep){ | ||
tsims <- list() | ||
tstep0 <- tstep | ||
min_tstep <- unique(as.numeric(diff(df$date.long[1:10]))) #"corresponds to raw data sets!" | ||
if(tstep %% min_tstep != 0) stop('selected time step (',tstep,'s)is not a multiple of the original sampling resolution (',min_tstep,'s). Please revise!') | ||
if(tstep == 0) tstep0 <- min_tstep | ||
|
||
df$date.long <- as.POSIXct(df$date.long,tz = 'UTC') | ||
df$date <- as.Date(df$date.long) | ||
df$year <- as.numeric(format(df$date, "%Y")) | ||
df$month <- as.numeric(format(df$date, "%m")) | ||
df$day <- as.numeric(format(df$date, "%d")) | ||
df$tstep <- tstep0 | ||
|
||
tstarts <- which(df$date.long < df$date.long[1]+tstep0) | ||
tag <- paste(df[1,which(names(df) %in% c('Serial','tag',"Ptt","DeployID"))],collapse=" - ") | ||
# head(df) | ||
tstart <- tstarts[1] | ||
for(tstart in tstarts){ | ||
cat('resampling time series data from tag',tag,'with time step', tstep, 's - repetition',tstart,"of", tail(tstarts,1),'\n') | ||
ii <- which(as.character(df$date.long) %in% as.character(seq(df$date.long[tstart],df$date.long[nrow(df)],by=tstep0))) | ||
ts <- df[ii,] | ||
tsims[[tstart]] <- ts | ||
} | ||
return(tsims) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.