

R CODE FORMATTER UPDATE
This chart will automatically update whenever the inputs change (e.g., if the data file is updated, or the questions are re-coded).Įvery table has a Reference Name, which can be viewed and changed by right-clicking on the table and selecting Reference Name. The example below creates a new table as the ratio of two existing tables, removes a few rows, and creates a chart. New tables and other types of outputs (strings, charts, variables, data files) can be created by manipulating tables. See the Accessing Data Properties from R example dashboard for details. See Data Sets in R for more information.Īs well as the raw data, variables and questions have attributes providing metadata about the variable or question. R code can refer to both variables and questions, by typing either the Variable Name or Question Name into the R Code box.

(If you are not familiar with the R Language, refer to Learning the R language.) In the example below, a histogram is created of 9 numbers. The output will typically be a table, chart, text string, or an error message. The result is sent back to Q, and shown on your screen (i.e., the result is the R Output). This sends the instructions over a secure internet connection to a computer in the cloud. These instructions need to be written in the R Language. Entering instructions in the R Code box within Properties, on the right-hand side of the screen (in the Object Inspector).Selecting Create > R Output (or, right-click on an item in the Report Tree).Any R code that is created via R Outputs, Standard R, or QScripts can be set to automatically update when the inputs change (e.g., if the input data changes, if a new data file is created, or if other options are changed).Īn R Output is an item in the Report Tree that contains both some R code and the result of the R code. This is how most advanced analyses are conducted in Q (e.g., regression, principal components analysis). Accessing the R functions using menus and forms.Entering R code directly into Q in R Outputs.There are a number of ways of using R from within Q: 2.5 Avoiding ambiguous references names.2.2 References to variables and questions.
