0

I have made sure that the work directory matches where I am pulling everything out of. I have deleted any spaces in all files. I set the working directory and tried to render file. I have also listed the entire file address to render. I have checked the existence of the file in rstudio. I have also tried it with the file open and close in rstudio. I have also simply changed 'library("rmarkdown")' to 'library(rmarkdown)' with no result difference

I just cant get it to work...

```{r, echo=FALSE, results='hide',message=FALSE, warning=FALSE}
library("rmarkdown")
library(mdsr)
library(dplyr)
library(class)
render("STAT310_Lecture-Week4_8_2_part2.Rmd",output_file=NULL)

Error in file(con, "r") : cannot open the connection

file.exists("C:/Users/tiffa/Desktop/School/summer/310/STAT310_Lecture-Week4_8_2_part2.Rmd") [1] TRUE

From the properties of "STAT310_Lecture-Week4_8_2_part2" (.rmd) C:\Users\tiffa\Desktop\School\summer\310

Please help! What am I missing?

Phil
  • 7,287
  • 3
  • 36
  • 66
  • I have also ran RStudio as an administrator. – Tiffany Jul 06 '20 at 19:02
  • How exactly are you running this code? What is in the `Rmd` document itself? Are you trying to render a markdown document inside another markdown document? – MrFlick Jul 06 '20 at 19:15
  • It's an .rmd inside an .rmd... my professor is not having an issue rendering her rmd's within her .rmd's She has them located in the same file, I have mine located in the same file. I also switched computers, since my main computer was running rstudio in onedrive cloud, and my other one has it in on its own drives. Still same issue, even as administrator. – Tiffany Jul 06 '20 at 20:52
  • It would be nice to have a fully [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Take out as much as you can from these files but still have something that reproduces the error. Then post the contents so we can run and test ourselves. It sounds like there may be another path in the `STAT310_Lecture-Week4_8_2_part2.Rmd` file that doesn't exist. – MrFlick Jul 06 '20 at 20:55
  • it finally ran after I opened pt1 and ran all, pt2 ran all, then while all were still open, opening and running the file I needed. Render, at least in this instance, doesn't run like read.XXX(). Also, not paying attention and allowing my other computer download rstudio to a cloud has probably been the major root to all my issues with R. I "answered" with all the coding to look at, for each of the 3 files, but I got it to run. – Tiffany Jul 06 '20 at 21:39

0 Answers0