Error message upon start-up of R-studio (1.1.463)

Recently, the following error message(s) are printed in the R console window immediately after I open R-studio (v1.1.463).

Loading required package: sp
Error in if (more || nchar(output) > 80) { :
missing value where TRUE/FALSE needed
Error in if (more || nchar(output) > 80) { :
missing value where TRUE/FALSE needed
Error in if (more || nchar(output) > 80) { :
missing value where TRUE/FALSE needed

If I run R (v3.5.1) from the R Gui this error message doesn't appear, so it seems like this is an R-studio issue. This error also is generated when using the Object Explorer (e.g. for when you call View() on a list) on a spatial[points, line, polygon]dataframe objects.

I've tried uninstalling and reinstalling both R and R-studio, but the problem persists. I also tried uninstalling and reinstalling package 'sp', but this did not solve the problem either. Neither did updating all packages.

Anyone have any idea what is causing this problem and how to fix it?

This is interesting.
What are your R session defaults? Does it load the previous session? Do you restore .RData into workspace at startup?

Taras:

Screen grab of my options below. I've never altered any of these (except perhaps for the default working directory):

There is a strong suggestion to alter these. I'd imagine that your reinstall of RStudio would have solved the problem, but just in case I would still reset the session and change the settings to reset it every time.


Another question: What happens when you remove sp package and then load a clean session?

Unchecking all the options except for "Automatically notify me of updates..." did not eliminate the problem. Removing package 'sp' from the package library generates a slightly different code after a new start-up:

Loading required package: sp
Error in .requirePackage(package) : unable to find required package ‘sp’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘sp’

Does this help?

No, it doesn't help :slightly_frowning_face: I am confused. Need some help from other community members.
Why would RStudio try to run any sort of code upon loading of a clean session?

Never mind...I forgot to update the "Save workspace to .Rdata upon exit" to Never. After that change, I re-started R-studio and the error message did not re-appear. Thank you for the help!

-D

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.