Rendering issue #8586
Replies: 5 comments 9 replies
-
It looks like the |
Beta Was this translation helpful? Give feedback.
-
Hi Jenny,
In my .Renviron file, I keep some file paths that I use Sys.genev() to read in some files. One of the file paths is DATABASE = “C:/Users/David.Jan/…/database”.
Calling Sys.getenv("DATABASE") in Positron works well. It prints the file path that I’m trying to read the file from.
One thing that I just noticed is that trying to pull up the .Renviron in my Positron environment using `usethis::edit_r_environ()` creates an error.
***@***.***
That could possibly be the issue, when I try to render.
The usethis command works well in R studio.
Hopefully I’m answering your questions!
From: Jennifer (Jenny) Bryan ***@***.***>
Sent: Friday, July 18, 2025 5:29 PM
To: posit-dev/positron ***@***.***>
Cc: Jan, David (DUA) ***@***.***>; Author ***@***.***>
Subject: Re: [posit-dev/positron] Rendering issue (Discussion #8586)
CAUTION: This email originated from a sender outside of the Commonwealth of Massachusetts mail system. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
It looks like the DATABASE env var is undefined in the render that you show. What gesture did you use to invoke that? What method are you using to define this environment variable?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/posit-dev/positron/discussions/8586*discussioncomment-13812162__;Iw!!CPANwP4y!SojoOD_EYgMoLtbsQjwCI7U7WkEAy3V3jly55nUh6xiidyBLJXzIGGMJSjkwJ5q09XiQr1ZNHKk_uX3_hoX-NaeKxw$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BAMN4WIXSNQ5CHTT7A3XNJD3JFRJXAVCNFSM6AAAAACB3PPHESVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOBRGIYTMMQ__;!!CPANwP4y!SojoOD_EYgMoLtbsQjwCI7U7WkEAy3V3jly55nUh6xiidyBLJXzIGGMJSjkwJ5q09XiQr1ZNHKk_uX3_hoVnqZ8xWg$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
-
We might need some more info on the details of your setup. If I put an env var in an ![]() Could you share some more details of your situation, or maybe try to make a dead simple example |
Beta Was this translation helpful? Give feedback.
-
user-level .Renviron! I do not have .Renviron set up by project. Here's the error message: ![]() It says consult the log. Let me know if there's something specific you need from that as well. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am reading in a file from file path using a R environ file.
projections <- read_csv(file.path(Sys.getenv("DATABASE"), "datasets", "lt_proj", "2023_2033", "LTProjections2023_2033.csv"))
This runs well in Positron, but when I want to render/knit the qmd file, I get this error that it can't locate the file because it doesn't recognize the initial file path called in the R Environ file.
I've tried this exact same thing in R studio and I'm able to run and knit without issue.
Has anyone experienced this issue?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions