Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should file paths start at ./? #4

Open
Aariq opened this issue Jul 11, 2022 · 2 comments
Open

Should file paths start at ./? #4

Aariq opened this issue Jul 11, 2022 · 2 comments

Comments

@Aariq
Copy link
Member

Aariq commented Jul 11, 2022

Ts <- read.csv("../data/Halfhourly_TS_011321.csv") %>%

File paths starting at ../ don't work for me. I think ./ points to the project root regardless of the RStudio settings. If this really is a difference between our setups, then maybe here() is worth using.

@jessicaguo
Copy link
Collaborator

So, this is one of the undocumented facets of Rmds. To knit, I manually set the working directory to the Rmd's file folder. Perhaps a good topic of discussion next week - I've been asking how to change this setting for Rmds, but perhaps here() would solve this problem more reproducibly?

@Aariq
Copy link
Member Author

Aariq commented Jul 15, 2022

I think it's safer to assume that the working directory is the project, although .Rproj is .gitignored so maybe it's not safe to assume that this will be run as an R Project? Happy to chat about it more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants