Skip to content

Using here outside of Rstudio Projects (works..., but why and how) #125

@RobinKohrs

Description

@RobinKohrs

So this is basically my file structure more or less. I have a "parent-dir" (my_analysis_project) which is a git-repo. It contains two directories. One R package and one folder with a lot of quarto documents. Kind of like this:

my_analysis_project/
 |.git
 |.gitignore
├── research_package/         
│   ├── R/
│   │   └── some_functions.R
│   ├── data/
│   │   └── package_data.csv
│   ├── research_package.Rproj # An RStudio project *for this package*
│   └── DESCRIPTION
│
└── reports_and_docs/        
    ├── data_inputs/           
    │   └── report_specific_raster.tif
    ├── images/
    │   └── logo.png
    ├── report1.qmd
    ├── report2.qmd
    └── _quarto.yml 

I am working on the report1.qmd file and I would like to access the report_specific_raster.tif using best practices. I tried a couple of things that did not work, but what is working is

here("reports_and_docs", "data_inputs", "report_specific_raster.tif")

And I wondering why that is. Somehow the my_analysis_project is set to as the project-home although there is no .Rproj-file. Am I missing something very obvious here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions