How to load data use relative path in quarto? #2212
Unanswered
lizhiwei1994
asked this question in
Q&A
Replies: 2 comments 2 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
This is in the doc: https://quarto.org/docs/projects/code-execution.html#working-dir This allows to change the default behavior which is to have rendering happen with working directory being the document folder, and to use the Project root instead. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone.
In my slides, I need load some data. I can only use absolute paths to read in data, because when I use relative paths it reports an error.
For example, my absolute paths for
data1.csv
is:D:/How to plot in R/examples/data1.csv
.I want to use relative paths in my R project, such as
examples/data1.csv
.In R markdown, we can choose the Knit Directory (pls see How to correctly specify relative path). But I don't find a similar button in quarto.
My folder structure is as follows.
How to plot in R/
├─ How to plot in R.Rproj
├─ slides/
│ ├─ index.qmd
├─ examples/
│ ├─ data1.csv/
│ ├─ data2.csv
│ ├─ data3.csv
Beta Was this translation helpful? Give feedback.
All reactions