Description Usage Arguments Value Examples
View source: R/Module_Sub_boots_functions.R
Reformat bootstrapped input data to match normal format
1 | reformatBootData(boot.output, prepData.ouput)
|
boot.output |
A list of lists. Ouput of |
prepData.ouput |
A list. Output of |
A list with length equal to number of bootstrap samples (equaling the
column count in each matrix in boot.output
). Each subelement is a
list and maintains the structure of prepData.output
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data.use <- read.csv("SampleFile_WithAge.csv") # read in raw data
dat.prepped <- prepData(datafile = data.use,out.labels="v2")
boot.n <- 1000
boot.output <- lapply(dat.prepped$data, function(x){
#name of age column varies, so use index:
series.use <- x[,3]
createBoots(series = series.use, boot.type = "meboot", boot.n = boot.n , plot.diagnostics = FALSE )
createBoots(series = series.use, boot.type = "stlboot", boot.n = 1000 , plot.diagnostics = FALSE )
})
bootdata.reformat <- reformatBootData(boot.output, prepData.ouput = dat.prepped)
length(bootdata.reformat)
str(bootdata.reformat[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.