Missing default directory on install-shutdown save

When installing a package that is already loaded, RStudio recommends that it save the session and do a shutdown/restart. I usually accept this recommendation. (the reason I do such installs is usually that I have added one or more packages to a list of packages I install in a new project). I find that I often get some message about not being able to save part of my session. As an example, here is the most recent one:

"Error saving session (plots_dir): The system cannot find the path specified"

I did not create and do not consciously make any use of a directory of that name, so I assume it is a default directory of some sort, and I wonder what is causing the error and how to prevent it.

I have had versions of this error four or five more times, and I am still unable to find the problem. Any hints or suggestions would be much welcome. Here is more information on an example where it occurs, including the sessioninfo for this session.

I try to install a package, here fp33. I get an error, shown, and then a dialog box, not shown, asking if I want to restart and assuring me that my data and work will be saved. RStudio then does restart the R session, but says it can not find the path "plots_dir". Note that I did not create a directory of this name and have not created any plots in this session, so I am assuming this is an RStudio problem or something specific to package installation.

install.packages('fpp3', dependencies = TRUE)
Error in install.packages : Updating loaded packages

Restarting R session...

Error saving session (plots_dir): The system cannot find the path specified
WARNING: Forcing suspend of process in spite of all session data not being fully saved.

install.packages("fpp3", dependencies = TRUE)
Installing package into ‘D:/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/fpp3_0.1.zip'
Content type 'application/zip' length 285335 bytes (278 KB)
downloaded 278 KB

package ‘fpp3’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\Truth\AppData\Local\Temp\RtmpQf88DD\downloaded_packages

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.6.1 Matrix_1.2-17 tools_3.6.1 grid_3.6.1 packrat_0.5.0 rlang_0.4.1
[7] lattice_0.20-38

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