0

My program runs exactly how I want it to run. All I need to do now is knit the program. How do I save my data that I have imported through R studio so that I can call it in my program and knit?

I have tried save(), save.image(), knitting directly using code that supposedly should have knitted using what was in the environment, and importing data directly using code(this left me with even more problems so I gave up).

This is my latest effort:

dir()

[1] "airline.Rdata"       "airline.Rds"         "cheesedata.Rdata"
[4] "cheesedata.Rds"      "desktop.ini"         "myEnvironment.RData"

load('cheesedata.Rds')

load('airline.Rds')

The rest of the code should be fine

Quitting from lines 3-47 (HW3.spin.Rmd) Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> load -> readChar Execution halted

Phil
  • 7,287
  • 3
  • 36
  • 66
Cory
  • 3
  • 1
  • 1
    readRDS('cheesedata.Rds') instead of load()? – Steffen Moritz Sep 19 '20 at 01:14
  • I gave that a try and got the same error code. Is there anything else completely different that error could mean? I think I might be troubleshooting something that isn't the problem but have no idea what other code to upload that could be the problem. – Cory Sep 19 '20 at 02:57
  • 1
    Maybe take a look at the best voted answer in this thread: https://stackoverflow.com/questions/26994958/error-cannot-open-the-connection-in-executing-knit-html-in-rstudio – Steffen Moritz Sep 19 '20 at 03:02
  • Otherwise, you probably need to provide a more reproducible code example, that we can help you. – Steffen Moritz Sep 19 '20 at 03:02

0 Answers0