View source: R/plottingfunctions.R
plotfactortrajectories | R Documentation |
plotfactortrajectories
plots the averaged output of the factors
used to generate simulated trial data
plotfactortrajectories(data, tinfo, tds, opt2plot, mergeacrossreps = TRUE)
data |
the |
tinfo |
the |
tds |
the |
opt2plot |
a data.table with a single row using parameter names to instruct the function which parameters to hold constant and plot the results of |
mergeacrossreps=TRUE |
logical input of whether to merge across repititions |
a ggplot object containing the plot
data(results_trajectories)
data<-simresults$rawdata$precensor # this gives a list of length (total reps done)
tinfo<-simresults$results # dim[1] of tinfo gives the parameter space that went in
tds<-simresults$parameterselections$trialdesigns
mergeacrossreps<-TRUE
plots1<-vector(mode="list",length=length(simresults$parameterselections$trialdesigns))
for(ip in 1:length(plots1)){
param2hold<-data.table(carryover_t1half=0,trialdesign=ip)
plots1[[ip]]<-plotfactortrajectories(data,tinfo,tds,param2hold,mergeacrossreps)
}
# See vignettes for additional details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.