second post

learning
paths
R
my second post
Author

Eric Allatta

Published

March 20, 2026

The path problem

R working directory default in renv project is project root. Quarto render uses knitr, which uses the current location of the file to be rendered as root.

The here package

The easiest solution is the ‘here’ package

library('here')

read_delim(here('data/hs_directory_2025.csv'), skip=1, trim_ws=TRUE, delim=',')