Can't/don't you use relative paths?
library(..., lib.loc = "./MyLibrary")
Then your project is perfectly portable. The only thing you need to take
care of is to run your code from your project directory. In R-studio
this is easily done by using projects. Outside of R-studio it depends on
ho
I think 'package:renv' does a lot of the stuff you mentioned here. I
think they accomplished your issue by making an .Rprofile file for
each project. The working directory would be set to the root directory
of the project, the R profile runs and sets .libPaths() as
appropriate, then the scripts can
On Thu, 23 Nov 2023 19:39:48 +
Tony Wilkes wrote:
> This brings me to my actual question: is it possible to determine the
> source file location of an R script
This depends on how the script is being run. With source(file,
keep.source = TRUE), you can define a function and immediately ask fo
According to the description, this should be what you need:
https://cran.r-project.org/web/packages/scriptName/
I only got NULL, but I also only tried within Rstudio...
Here are some related questions, although you've probably already tried the
answers:
https://stackoverflow.com/questions/180007
Not sure, but I think the 'here' package might do what you want. It's
tidyverse-affiliated but pretty stable
On Thu, Nov 23, 2023, 2:39 PM Tony Wilkes wrote:
> Hi everyone,
>
> I have a question. I hope it's not a stupid question.
>
> Suppose you'd want to perform version control and project iso
Hi everyone,
I have a question. I hope it's not a stupid question.
Suppose you'd want to perform version control and project isolation. You'd
create a project folder (let's call it "MyProject"), and place all the R
packages you need for that project inside a subfolder (let's say
"MyProject/MyL