View source: R/simulate_DepthTS.r
simulate_DepthTS | R Documentation |
function to simulate depth series data from a template data set.
simulate_DepthTS(ts_df, ndays=10, gaps=TRUE, trate=90,
random_Depth=TRUE, ref_Depth_lim=300, random_Depth_lim=c(100, 700))
ts_df |
data.frame holding the template depth time series data. |
ndays |
number of days of depth time series data that should be simulated). |
gaps, trate |
Whether gaps should be introduced into the dataset according to the transmission rate ( |
random_Depth, ref_Depth_lim, random_Depth_lim |
Whether depth records from the template data set should be additonaly randomized. In this case, depth records >= |
Robert K. Bauer
dy_DepthTS, plot_DepthTS, plot_data_coverage
### load sample depth and temperature time series data from miniPAT:
# ts_file <- system.file("example_files/104659-Series.csv",package="RchivalTag")
# ts_df <- read_TS(ts_file)
# ts_df$Serial <- ts_df$DeployID
# head(ts_df)
# dy_DepthTS(ts_df) # plot original data
#
# ts_df_sim <- simulate_DepthTS(ts_df) # simulate data
#
# dy_DepthTS(ts_df_sim) # plot simulated data
#
# library(dplyr)
# meta <- rbind(ts_df[,names(ts_df_sim)],ts_df_sim) %>%
# group_by(DeployID, Serial, Ptt) %>%
# summarise(dep.date=min(date),pop.date=max(date)) %>%
# as.data.frame()
#
# ts_list <- list(ts_df,ts_df_sim)
# names(ts_list) <- meta$Serial
#
# # plot data coverage
# plot_data_coverage(x = ts_list,type="ts", meta = meta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.