Code Monkey home page Code Monkey logo

Comments (3)

gaborcsardi avatar gaborcsardi commented on August 26, 2024

What's your OS? What's your RStudio version? What's crayon's version?

What's the output of

crayon:::detect_tty_colors()

What's the output of

system("tput colors 2>/dev/null", intern = TRUE)

from crayon.

rossellhayes avatar rossellhayes commented on August 26, 2024

Sorry, that was really bad GitHub etiquette on my part.

I'm running RStudio 1.4.1106 on Windows 10 build 19042. This is R 4.0.5 and crayon 1.4.1.

Both crayon:::detect_tty_colors() and system("tput colors 2>/dev/null", intern = TRUE) return 256 in RStudio's terminal.

I ran through num_ansi_colors() with debugging and none of the if statements were true. This meant it went to the last condition, running detect_tty_colors(). In detect_tty_colors(), the condition os_type() == "windows" && win10_build() >= 16257 was true, which returns a hardcoded 256L.

Here's the session info:

Session info
# - Session info ---------------------------------------------------------------
#  setting  value
#  version  R version 4.0.5 (2021-03-31)
#  os       Windows 10 x64
#  system   x86_64, mingw32
#  ui       RTerm
#  language (EN)
#  collate  English_United States.1252
#  ctype    English_United States.1252
#  tz       America/Los_Angeles
#  date     2021-04-24
# 
# - Packages -------------------------------------------------------------------
#  package     * version date       lib source
#  cli           2.4.0   2021-04-05 [1] standard (@2.4.0)
#  crayon      * 1.4.1   2021-02-08 [1] CRAN (R 4.0.5)
#  glue          1.4.2   2020-08-27 [1] CRAN (R 4.0.3)
#  rlang         0.4.10  2020-12-30 [1] CRAN (R 4.0.5)
#  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.0)
#  withr         2.4.1   2021-01-26 [1] standard (@2.4.1)
# 
# [1] C:/Users/Alex/Documents/R/win-library/4.0
# [2] C:/Program Files/R/R-4.0.5/library

from crayon.

gaborcsardi avatar gaborcsardi commented on August 26, 2024

What's your shell in the terminal? CMD or PowerShell?

from crayon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.