view: View the tables and plots in a results object.

View source: R/view.R

viewR Documentation

View the tables and plots in a results object.

Description

view allows you to view output independently of JASP. By default this output is shown in the RStudio viewer, if you would like it to go to your webbrowser, run setPkgOption("view.in.rstudio", FALSE). The same javascript/css/html is used as in JASP and so the output is identical. This function may be called directly, but it is more convenient to use runAnalysis.

Usage

view(results)

Arguments

results

A named R list returned from a JASP analysis, a json results string copied from the Qt terminal, or a path to a .jasp file.

Value

A html page is generated and placed in a temp directory

Examples


options <- analysisOptions("BinomialTest")
results <- runAnalysis("BinomialTest", "debug", options, view=FALSE)
view(results)

# Above and below are identical (below is taken from the Qt terminal)

view('{
   "id" : 6,
   "name" : "BinomialTest",
   "results" : {
      ".meta" : [
         {
            "name" : "binomial",
            "type" : "table"
         },
         {
            "meta" : [],
            "name" : "descriptives",
            "type" : "object"
         }
      ],
      "binomial" : {
         "citation" : [ "JASP Team (2017). JASP (Version 0.8.2) [Computer software]." ],
         "data" : [
            {
               "case" : "",
               "counts" : ".",
               "level" : ".",
               "lowerCI" : ".",
               "p" : ".",
               "proportion" : ".",
               "total" : ".",
               "upperCI" : "."
            }
         ],
         "footnotes" : [
            {
               "symbol" : "<em>Note.</em>",
               "text" : "Proportions tested against value: 0.5."
            }
         ],
         "schema" : {
            "fields" : [
               {
                  "combine" : true,
                  "name" : "case",
                  "title" : "",
                  "type" : "string"
               },
               {
                  "name" : "level",
                  "title" : "Level",
                  "type" : "string"
               },
               {
                  "name" : "counts",
                  "title" : "Counts",
                  "type" : "integer"
               },
               {
                  "name" : "total",
                  "title" : "Total",
                  "type" : "integer"
               },
               {
                  "format" : "sf:4;dp:3",
                  "name" : "proportion",
                  "title" : "Proportion",
                  "type" : "number"
               },
               {
                  "format" : "dp:3;p:.001",
                  "name" : "p",
                  "title" : "p",
                  "type" : "number"
               }
            ]
         },
         "title" : "Binomial Test"
      },
      "title" : "Binomial Test"
   },
   "revision" : 2,
   "status" : "complete"
}')


jasp-stats/JASPTools documentation built on April 24, 2024, 11:18 a.m.