analysisOptions | R Documentation |
analysisOptions
provides an easy way to create analysis options that can be supplied to runAnalysis
.
analysisOptions(source)
source |
One of three: (1) R function name, (2) path to .jasp file or (3) json string. See the details section for more information. |
There are three types of allowed input. 1) The name of the R function of the analysis (case-sensitive); jaspTools will attempt to read the .qml file for that analysis and create a set of default options. 2) the path to .jasp file that has one or more analyses. Or (3) a json string that was sent by the JASP application. This json can be obtained by having JASP log to file (JASP>Preferences>Advanced>Log to file). The logs can be found by clicking 'Show logs" in the "Logging options". Click on the file "Engine.log" that has "Engine::receiveAnalysisMessage:" (usually Engine 1), copy the content between the { and }. Be sure to use single quotes (') when supplying this string.
A list containing options of the analysis. If source
is a .jasp file with multiple analyses, then a list of lists.
If source
is the name of the R function of the analysis then all default options have been
filled in and booleans set to FALSE. The options that have no default are
left empty.
jaspOptions <- analysisOptions("~/Documents/someFile.jasp")
options <- jaspOptions[[1]] # if there are multiple analyses in the .jasp files you need to select one
options <- analysisOptions("BinomialTest")
options[["variables"]] <- "contBinom"
# Above and below are identical (below is taken from the Qt terminal)
options <- analysisOptions('{
"dynamicModuleCall" : "",
"id" : 1,
"jaspResults" : true,
"name" : "BinomialTest",
"options" : {
".meta" : {
"variables" : {
"containsColumn" : true
}
},
"VovkSellkeMPR" : false,
"confidenceInterval" : false,
"confidenceIntervalInterval" : 0.950,
"descriptivesPlots" : false,
"descriptivesPlotsConfidenceInterval" : 0.950,
"hypothesis" : "notEqualToTestValue",
"plotHeight" : 320,
"plotWidth" : 480,
"testValue" : "0.5",
"variables" : [ "contBinom" ]
},
"perform" : "run",
"revision" : 0,
"rfile" : "",
"title" : "Binomial Test",
"typeRequest" : "analysis"
}')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.