Error in utils::askYesNo(msg) : Unrecognized response "<r code>"

Whenever I start my R session on my new M1 mac I get the following message on the first bit of text that I pass into the console:

It's kind of hilarious, but it's also really annoying and jarring and I'd just prefer if I could you know, use my R console like a normal person.

I have a feeling that this is tied to my .Rprofile, but I can't figure out which part, and removing it hasn't seemed to have helped.

Below is my .Rprofile, if that helps,

Any help is much appreciated! :slight_smile:

options(RDocs.override = TRUE)

.First <- function() {
  options(
    repos = c(
      milesmcbain = 'https://milesmcbain.r-universe.dev',
      CRAN = 'https://cloud.r-project.org'
    ),
    browserNLdisabled = TRUE,
    deparse.max.lines = 2
  )
}


if (interactive()) {
  suppressMessages(require(devtools))
  suppressMessages(require(testthat))
  suppressMessages(require(usethis))
  suppressMessages(require(fs))
  suppressMessages(require(pak))
  suppressMessages(require(clipr))
  suppressMessages(require(gert))
  system("cal -A 2")
}

if (interactive() && requireNamespace("shrtcts", quietly = TRUE)) {
  shrtcts::add_rstudio_shortcuts(set_keyboard_shortcuts = TRUE)
}

# some VS Code options
options(
  vsc.use_httpgd = TRUE,
  vsc.rstudioapi = TRUE
)

# usethis options
options(
  usethis.full_name = "Nicholas Tierney",
  usethis.protocol = "https",
  usethis.description = list(
    `Authors@R` = 'person("Nicholas", "Tierney", role = c("aut", "cre"), email = "nicholas.tierney@gmail.com", comment = c(ORCID = "https://orcid.org/0000-0003-1460-8722"))',
    License = "MIT + file LICENSE",
    Language =  "es",
    Version = "0.0.0.9000"
  ),
  # set SI to true
  reprex.session_info    = TRUE
)

# sort out github credentials
if (requireNamespace("credentials", quietly = TRUE)) {
  credentials::set_github_pat(verbose = FALSE)
}

# set slides to daemonzied mode to not block R session
options(servr.daemon = TRUE)

:wave: This was me! Sorry! I thought it would be helpful to try to make the shortcuts file for you, but it looks like I was too eager in my attempts to help.

I pushed a fix for this flow in shrcts, and if you update the latest version it should work better. Now, only edit_shortcuts() should ask you if you want to create a .shrtcts.R file and add_rstudio_shortctuts() will no-op with a message if it can't find the shortcuts file.

1 Like

Ah, awesome! I'll try this out soon :slight_smile:

1 Like

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.