3

I cannot install any R packages from Github, though I've done this several times before. I've tried this with both R Versions 3.5.0 and 3.5.1.

Attempting to install "https://github.com/rstudio/bookdown/bookdown-master.zip" using:

devtools::install_github('rstudio/bookdown')
githubinstall::githubinstall("bookdown")

or downloading and trying to load locally...

install_local("/Users/Brian/Documents/bookdown-master.zip")

always gives me the error message

Error in readLines(f) : 
(converted from warning) incomplete final line found on '/Users/Brian/.Rprofile'

I've tried other workarounds, as well, but all roads seem to lead to this error message, and I can't find anything that would tell me what it relates to.

Any ideas?

Michael Lihs
  • 7,460
  • 17
  • 52
  • 85
pneud
  • 91
  • 7
  • Sounds like there's something formatted incorrectly in your Rprofile file. [Here's](https://stackoverflow.com/q/46819684/5325862) another question, albeit a closed one, with some links that might help – camille Nov 04 '18 at 22:14
  • Thanks Camille. I was out of ideas. That info helped me solve my problem. I didn't realize that .Rprofile was something that I could edit - but apparently I had done it before. – pneud Nov 05 '18 at 15:17

1 Answers1

6

The error was the result of a previous edit that I had made to .Rprofile while creating a website with the blogdown package. I didn't remember doing this, but clearly it was interfering with package downloads.

After running file.edit(".Rprofile"), deleting the single line it contained, and then restarting R, packages are installing again.

pneud
  • 91
  • 7