Recently the output from the package 'crayon' which produces colored console and command line text, is not working when code is run as a job, but is working in the console and terminal.
I've tried a fresh install of R and Rstudio but the problem persists
code is run as a job
I didn't understand.
could you please add more explanation?
No Problem.
I'm running the code as a local job in Rstudio, within the 'jobs' tab. If I run the code in console or terminal the colored output by crayon works fine, but if run as a local job the ASCII characters are ignored and there is no colored output.
Image of example below
I have seen the same phenomenon.
As another confirmation, I also checked in the command prompt, which is the terminal screen of windows, and the color came on.
and Rscript too
I'm sorry that I can't help you with the cause.
This is a known issue. Please comment/upvote:
The job system does support colored output; the problem is likely that the mechanism that the crayon package uses to detect whether it's running under a color-compatible console doesn't trigger inside a job.
I created a reprex & issue for this here.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.