Description Usage Arguments Value Examples
View source: R/extract_time_elapsed-methods.R
Applied to an object of type stansim_collection,
extract_time_elapsed()
will return the time taken to fit the
models contained within the object a dataframe, subject to the filtering
specified by the function arguments.
1 2 3 | ## S3 method for class 'stansim_collection'
extract_time_elapsed(object, sim_names = "all",
datasets = "all", chains = "all", stages = "all", elapsed = NULL, ...)
|
object |
An object of S3 class stansim_collection. |
sim_names |
Either a character vector containing the names of the
|
datasets |
Either a character vector containing the names of datasets
(as provided to the original |
chains |
Either a character vector containing the numbers of the stan model
chains to return, or the string |
stages |
Either a character vector containing the names of model fitting
stages, |
elapsed |
Either a function taking a single numeric argument that
returns a Boolean value, or |
... |
other arguments not used by this method |
A dataframe containing the specified data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# extract full dataset
extract_time_elapsed(simulation)
# extract all rows for dataset "data_file-12.rds"
extract_time_elapsed(simulation, datasets = "data_file-12.rds")
# extract results for chains 1 and 3
extract_time_elapsed(simulation, chains = c(1, 3))
# extract results for only the warmup stage
extract_time_elapsed(simulation, stages = "warmup")
# extract all elapsed times greater than 60 seconds
extract_time_elapsed(simulation,
elapsed = function(x) x > 60)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.