MicroStrategy ONE
The R Integration Pack is no longer supported as of December 2024.
Troubleshooting the Development of R Scripts
The following table lists error messages that are potentially caused when creating your R script or processing it with the deployR utility (see Chapter 4, Developing R Analytics for MicroStrategy). An R developer who creates R Analytics can review the resolutions listed below to troubleshoot any problems.
Error Message | Cause | Resolution |
---|---|---|
One of the defined RVAR variable names exceeds the maximum allowable length (250). | A variable has a name that exceeds 250 characters. This is often caused by making manual changes to the R script header block. This can also be caused by a variable in your R code that exceeds 250 characters for its name. | Use the deployR utility to update the names of your variables so that they meet the 250-character limit. If the names depend on information that is part of the R script code, make modifications to the R script code to reduce the length of variable names. |
One of the defined RVAR parameter names exceeds the maximum allowable length (250). | A parameter has a name that exceeds 250 characters. This is often caused by making manual changes to the R script header block. This can also be caused by a parameter in your R code that exceeds 250 characters for its name. | Use the deployR utility to update the names of your parameters so that they meet the 250-character limit. If the names depend on information that is part of the R script code, make modifications to the R script code to reduce the length of names. |
One of the defined RVAR options exceeds the maximum allowable length (250). |
An option has a name that exceeds 250 characters. This is often caused by making manual changes to the R script header block. | Use the deployR utility to update the names of your options so that they meet the 250-character limit. |
Missing 'MICROSTRATEGY_ BEGIN' marker. | The header block of the R script is incorrect. This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. Once the R script has been updated using deployR, open the R script to ensure that it includes MICROSTRATEGY_BEGIN in the header block. |
Missing 'MICROSTRATEGY_ END' marker. | The header block of the R script is incorrect. This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. Once the R script has been updated using deployR, open the R script to ensure that it includes MICROSTRATEGY_END in the header block. |
The variable name 'Variable' is defined multiple times. Where Variable is the name of the variable. |
The header block of the R script is incorrect. This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script, which ensures that variables are not defined multiple times. |
The name 'Variable' is reserved and cannot be used as a variable name. Where Variable is the name of the variable. |
Your R code uses a reserved name for a variable. |
Update your R code to ensure that variables do not use reserved names. Reserved names include:
|
The variable name 'Variable' begins with 'mstr.', which is reserved for internal use only. Where Variable is the name of the variable. |
Variables beginning with mstr. are reserved to pass information between MicroStrategy and the R script. This can occur in your R code or within the R script header block if manual changes were made. | Update your R code to ensure that variables do not use the mstr. prefix. Use the deployR utility to process your R script, which ensures that variables do not use this reserved prefix. |
The variable name 'Variable' contains an invalid character. Where Variable is the name of the variable. |
Your R code uses an invalid character or begins with an invalid character, or manual changes were done to the R script header block. |
Update your R code to ensure that variables do not use invalid characters. Invalid characters include: /;,:|\{} []+=-!@#$%^&*() ~?><'`\" Additionally, you cannot use any of the following characters as the first character of a variable name: _0123456789 Use the deployR utility to process your R script, which ensures that variables do not use invalid characters in their names. |
'-Option' is an unsupported parameter data type. Where Option is the name of the data type for a variable. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. |
'Parameter' is not a valid function parameter name. Where Parameter is the name of the parameter. |
This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. |
Use the deployR utility to process your R script, which ensures that parameters use names of the following formats:
Where N is a digit from 1 to 9. |
The function parameter name 'Parameter' is defined multiple times. Where Parameter is the name of the parameter. |
This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. |
Must specify data type (-num or -str) for all output (-o) variables. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script and select an appropriate data type for each output variable. |
At least one input is required. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. Your changes cannot be saved until you define at least one input. |
At least one output is required. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. Your changes cannot be saved until you define at least one output. |
Vector output requires at least one vector input. | All inputs are defined with a scalar data type, but at least one of the outputs uses a vector data type. | Use the deployR utility to process your R script. Your changes cannot be saved until at least one vector input is defined when there are vector outputs. |
All scalar inputs and output. Must use RScriptSimple function. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. When all inputs and outputs use the scalar data type, the RScriptSimple function is automatically used for the metric expression. |
Vector inputs and output. Must use RScriptU or Rscript function. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. A valid function is automatically used for the metric expression. |
Vector inputs and scalar output. Must use RScriptAggU or RScriptAgg function. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. A valid function is automatically used for the metric expression. |
RScript and RScriptAgg require a vector for the first input. | This is often caused by not using the deployR utility to process the R script or by making manual changes to the R script. | Use the deployR utility to process your R script. A valid metric expression is automatically generated based on your R script. |
R script execution error: RErrorMessage Where RErrorMessage is the error message returned from R. |
An error was returned from the R script code. | Review the error message returned and review your R code. You can use the R console provided with your installation of R to perform troubleshooting on your R code. |
R script execution error with no error message. Possible causes: execution error outside tryCatch() or syntax error. | The R code includes a syntax error or an execution error occurred that was not caught by tryCatch() error handling. | Review the error message returned and review your R code. You can use the R console provided with your installation of R to perform troubleshooting on your R code. If no errors are returned from the R console, review your R code for sections that are not included within a tryCatch(). |
Actual data type RDataType is not compatible with the expected data type DataType for output 'Output'. Where:
|
The data type defined in the R code and the data type defined by using deployR are not compatible. |
Determine the correct data type for the output:
|