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

Not recognizing the .here file in root directory #88

Open
kivanvan opened this issue Dec 6, 2022 · 4 comments
Open

Not recognizing the .here file in root directory #88

kivanvan opened this issue Dec 6, 2022 · 4 comments

Comments

@kivanvan
Copy link

kivanvan commented Dec 6, 2022

I am using the here package for my project, and I set a .here file in the root directory (for example, X:/root) where contains the folder of my code (for example, X:/root/code). However, every time I open my script and load the here package, it shows that it starts at where the code sits (i.e. X:/root/code).

One thing I can think of is that I loaded the package before I created the here file. I think that may be the cause. I then unload the package, reset the working directory to my root directory, and reload the package. It worked fine when I run my code by chunk in R markdown, but I wasn't able to knit the markdown because the package thinks the code folder is the root all the time. Is there a way to fix it?

@krlmlr
Copy link
Member

krlmlr commented Dec 7, 2022

Thanks. I'm afraid I don't follow.

This sort of question is a better fit for https://community.rstudio.com. Do you mind asking it over there? (You might want to read https://www.tidyverse.org/help/ first to maximize your chances of getting a good answer.)

@kivanvan
Copy link
Author

kivanvan commented Dec 7, 2022

Thanks for your suggestion. I think I found the solution after looking at the vignette for R markdown. And just one more side question, is here file still in use in this package?

@krlmlr
Copy link
Member

krlmlr commented Dec 12, 2022

The .here file still works. I'm no longer sure about the advice in ?set_here .

@kivanvan
Copy link
Author

Yes, I was confused by the documentation of set_here. I think maybe I don't need a .here file if I use i_am. But let me know if I got it wrong.

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