Product:
Spotfire Service for R , Spotfire enterprise Runtime for R
Keywords:
R script error, Spotfire 14, dplyr, tidyverse, mutate, cli package, terminal size, Spotfire upgrade
Description:
After upgrading to Spotfire 14, customers using dplyr
and tidyverse
packages in their R scripts may encounter errors that did not occur in previous Spotfire versions, such as Spotfire 12. These errors often involve issues with the mutate()
function or the cli
package.
Sample Error:
Here is a sample error message that customers might see:
Cannot determine terminal size (system error 6, The handle is invalid.)
@tty.c:24 (clic_tty_size)
Error: Problem with `mutate()` input `..1`.
✖ missing argument
ℹ Input `..1` is `<empty>`.
eval(script, envir = .GlobalEnv)
eval(script, envir = .GlobalEnv)
withCallingHandlers({
Max_Effective_Version %>% dplyr::mutate(mev_reported_status = ifelse(mev_sys_status == "No Status Available" & mev_audit_status != "No Status Available",
Resolution:
If the error persists even after installing the hotfix for R Service, you can try the following steps to resolve the issue:
-
Set cli.width Option:
The error is related to thecli
package, which attempts to determine the terminal size. Since the R Service runs as a Windows service without an available console, this error is expected. To resolve this, add the following line to your R script before loading thetidyverse
package:-
options(cli.width = 80)
library(tidyverse)
-
- Understanding the Error:
The error message indicates an issue with thecli
package, which is automatically loaded when you calllibrary(tidyverse)
. Setting thecli.width
option ensures that the package can determine a valid terminal size and continue without error.
Note:
If the issue persists after trying the above solution, please contact Revvity support with detailed logs for further assistance.
Comments
0 comments
Please sign in to leave a comment.