Site icon R-bloggers

Strange warning after loading own package

[This article was first published on rstats-tips.net, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

After upgrading my local R version to version 4.2.1 I always got an annoying warning after loading my own package. This only occurred using RStudio.

1
2
3
Warning message:
In length(steps) == 0 || nchar(steps) == 0 :
  'length(x) = 2 > 1' in coercion to 'logical(1)'

“Okay, that’s something new in R 4.2.0”, I thought and found https://stackoverflow.com/questions/72848442/r-warning-lengthx-2-1-in-coercion-to-logical1

But my code doesn’t use the cited code. Outside of RStudio, the warning doesn’t appear. So I cloned the repo again. No warning.

When I copied .Rprofile.user into the new directory the warning appeared again. So I explored the files step by step.

There was a file that seems to contain breakpoints. When deleting this file by calling Debug -> Clear All Breakpoints... the warning disappeared.

To leave a comment for the author, please follow the link and comment on their blog: rstats-tips.net.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.