Goal: knit an .rmd file file that is save in a directory other than the console directory.
Issue: the knitting machinary seems to have trouble seeing the global environment.
Code chunk:
getwd()
stem(dend$branches)
stripchart(dend$branches)
dend us a 1 column dataframe that was read in using the File | import command. It shows up in the environment tab. Running the code chunk successfully produces both graphs
From the console:
getwd()
[1] "/Users/Rob"
Within the code chunk the path refers to .rmd location:
[1] "/Users/Rob/Documents/Biostats/Week01"
Knit directory is set to Document Directory
When I knit the document I get the following error:
[image]
[1] "/Users/Rob/Documents/Biostats/Week01" The decimal point is 1 digit(s) to the right of the | 2 | 011334 2 | 677788999 3 | 0001334 3 | 55577 4 | 013 4 | 89 5 | 114 5 | 7
R Console
[1] "/Users/Rob/Documents/Biostats/Week01" The decimal point is 1 digit(s) to the right of the | 2 | 011334 2 | 677788999 3 | 0001334 3 | 55577 4 | 013 4 | 89 5 | 114 5 | 7
R 4.1.1
ยท
~/
[image]
Console
Render [image]
Jobs [image]
[image] .../Week01/Baer_HomewordWeek01.Rmd Output Issues
|.............. | 20% ordinary text without R code |............................ | 40% label: unnamed-chunk-1
processing file: Baer_HomewordWeek01.Rmd
Quitting from lines 10-13 (Baer_HomewordWeek01.Rmd)
Error in stem(dend$branches) : object 'dend' not found
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> stem Execution halted
What is this telling me when dend is clearly defined in my global environment? How should I avoid such problems? Is this a bug?