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

Paths in writing reports #176

Open
pschloss opened this issue Oct 19, 2022 · 1 comment
Open

Paths in writing reports #176

pschloss opened this issue Oct 19, 2022 · 1 comment
Labels

Comments

@pschloss
Copy link
Collaborator

This seems to touch on topics raised in #74, but I'm wondering how best to teach the issues with the path to data/gapminder_1997.csv. What we call the default Rmd file is not correct - I just looked again and the default Rmd file doesn't have

knitr::opts_knit$set(root.dir = normalizePath("..")

I'm not sure I really want to have the learners type this in since there's a lot going on there that will be pretty advanced. I could see three different options for presenting this concept...

  1. Put the ../ before the path, pointing out that rmarkdown is looking for data/ within reports/ rather than within the root of the proect
  2. Use the here package
  3. Use the normalizePath syntax as written in the teaching materials

My preference would be for 2 since I use 2 in my work. The downside is that it's another package to install, albeit with pretty simple syntax. But I think 1 would be fine in this context where there's only a few paths that would need the ../

@kelly-sovacool
Copy link
Member

I'm a fan of the here package. I think it wouldn't be too much extra overhead to teach briefly.

@kelly-sovacool kelly-sovacool added the 5-r-markdown Lesson 5 label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants