RevBayes within RStudio Error

223 views
Skip to first unread message

Alexander Ordynets

unread,
Oct 13, 2020, 6:17:18 AM10/13/20
to revbayes-users
Dear RevBayes community,

I am trying to run RevBayes within RStudio v. 1.3.1093 on Windows.
I am setting it as explained in the tutorials
I have also the package RevKnitr v 1.25.4 installed from GitHub.

My starting RMarkdown chunk looks like
```{r setup}
knitr::opts_knit$set(root.dir = "C:\\Users\\aordy\\tutorial_structure")
knitr::opts_chunk$set(engine.path = "C:\\Users\\aordy\\tutorial_structure\\software\\rb")
```

When I try to run a rb chunk,
```{rb}
molecular <- readDiscreteCharacterData("data\\example_file.nex")
```
I see that it launches rb but then it is pending 

RevBayes version (1.1.0)
Build from tags/1.1.0 (acd164) on Wed, May 13, 2020  1:11:29 PM
Visit the website www.RevBayes.com for more information about RevBayes.
RevBayes is free software released under the GPL license, version 3. Type 'license()' for details.
To quit RevBayes type 'quit()' or 'q()'.

> source("C:\Users\aordy\AppData\Local\Temp\RtmpqYGZig\chunk-code-7547db8411d.txt")
   Error: Could not open file "C:sersordyppDataocalemptmpqYGZighunk-code-7547db8411d.txt"

I would like to know how to fix this.

Thanks in advance for any advice!  
Alex
Message has been deleted
Message has been deleted

Alexander Ordynets

unread,
Oct 13, 2020, 6:31:27 AM10/13/20
to revbayes-users
PS. The screenshot of the problem described above.
rb_error.png.jpg

David Bapst

unread,
Oct 13, 2020, 7:50:59 AM10/13/20
to Alexander Ordynets, April Wright, revbayes-users
It would appear to be an issue with forward/backward slashes not being sanitized properly so the directory references work for both Windows and UNIX-style paths. I'm one of the original developers of the markdown/rknitr implementation, along with April Wright, but I'm afraid that I haven't been very involved in the last eight months or so. I've CC'd April so hopefully she will spot this.

Cheers,
-Dave



--
You received this message because you are subscribed to the Google Groups "revbayes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to revbayes-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/revbayes-users/fd8be5c7-45ca-4a51-9d56-9d56138f236bn%40googlegroups.com.


--
David W. Bapst, PhD
Assistant Instructional Professor
Geology & Geophysics
Texas A & M University
https://github.com/dwbapst/paleotree

Niklas Tysklind

unread,
Jun 22, 2021, 10:38:31 AM6/22/21
to revbayes-users
Hi, I'm running into the same problem. 

Is there a solution available to be able to use rb in Rstudio in Windows? 

Cheers, 

Niklas

Nick 23

unread,
Oct 19, 2021, 7:23:01 AM10/19/21
to revbayes-users
Hi - I also have the same problem with R.  I'm also using Windows.  Additionally in command line rb.exe I get a 'cannot set working directory' error when entering the path in the 'c:\\Users\\....' format, but it works fine when I run RevStudio.exe.  Is there a solution available?  Thanks 
Reply all
Reply to author
Forward
0 new messages