Error running knitr eval -> eval -> options

Hello,

I have been trying to use knit to run a simple Rmarkdown document. After installing Rstudio again, I get the same error when I open RStudio:

Error in options(blogdown.subdir = post, blogdown.author = "RicardoRS") : 
  object 'post' not found

This time, when I tried to install RMarkdown, I got the following error:

WARNING: Rtools is required to build R packages but is not currently installed.
Please download and install the appropriate version of Rtools before proceeding:

If I open R x64, I get again:

Error in options(blogdown.subdir = post, blogdown.author = "RicardoRS") : 
  object 'post' not found
[Previously saved workspace restored]

Following the guideline in CRAN, I type:

writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

Once I restart R x64, I check if that worked .

 Sys.which("make")
make 
  "" 

So it seems it didn't work. I read that sessionInfo() it is useful source of information to solve problems , so here is what I got:

R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

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

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

other attached packages:
[1] knitr_1.33

loaded via a namespace (and not attached):
[1] compiler_4.1.0 tools_4.1.0    xfun_0.24  

Trying to sort out the problem after reading 1.4 Global Options I even tried to change the option blogdown.subdir from "post" to "blog". It didn't work either. When I tried to install the package tinytex I got the following error

trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.33.tar.gz'
Content type 'application/x-gzip' length 30085 bytes (29 KB)
==================================================
downloaded 29 KB

Error in options(blogdown.subdir = post, blogdown.author = "RicardoRS") : 
  object 'post' not found
Execution halted

1: In utils::install.packages("tinytex", repos = "https://cran.rstudio.com/") :
  installation of package 'tinytex' had non-zero exit status```

There are many errors, but my guesswork is that being unable to install RTools causes further errors. At the same time, the blogdown.subdir error shows up when I just lunch RStudio or R x64, which can be a sign of something.

Could someone here give me a hand?
Thank you very much for your time and attention

Does it change when you specify when you use quotes around post :

options(blogdown.subdir = 'post', blogdown.author = "RicardoRS")

?

Hi HanOostdijk, thanks for your reply, very kind of you.

I changed it from blogdowdown.subdir = "post" to 'blog'. Since post did not exit, I thought it was a good idea to change it to blog.

  • Firstly I used blogdown::config_Rprofile()
  • Then I changed it to 'blog' as you suggested:

options(blogdown.subdir = 'blog', blogdown.author = "RicardoRS")

Once I restart Rstudio, I still got the following error. It seems the change made on the .Rprofile did not affect.

Error in options(blogdown.subdir = post, blogdown.author = "RicardoRS") : 
  object 'post' not found

I also noticed that the argument blogdown.subdir is not a character, so I typed also just blog. I got the same error. I think trying to update some package, I got a similar error but with extra information:
Calls: <Anonymous> -> eval -> eval -> options

Error in options(blogdown.subdir = post, blogdown.author = "RicardoRS") : 
  object 'post' not found
Calls: <Anonymous> -> eval -> eval -> options
Execution halted

I am not sure if it is related, but being unable to install Rtools could be a problem. As previously mentioned, once I add the line of code and I check it, with Sys.which("make"), it just returns "", instead of a directory. I installed everything again already, so I run out of options :cry:.

Ah, now within .Rprofile I got the following line that could be a hint:

# fix Hugo version
options(blogdown.hugo.version = "0.87.0")

I don't know if its a message from the beyond, but I just left the computer running update.packages().

I think this shows that 'the software' does not use your modified .Rprofile dataset.

See the following RStudio Community article how-to-check-that-r-profile-is-being-run-when-r-is-started and especially the link it contain for more information. The reference to the blogdown book is probably already familiar to you.

I think your problems with Rtools are not related to this problem.

1 Like

Hi,

Thanks again!

I followed the instructions in that link and it worked, so thank you very much! :+1:

This topic was automatically closed 7 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.