0

Hi I'm new to R and I'm using RStudio Cloud for a university stats course.

The code I'm having trouble with will run as a chunk but when I try to knit the project it comes up with an error saying that the object 'filename' not found.

The 'filename' is listed in the global environment but it is a tbl_df, which I'm thinking is not the right kind of object for knitting.

screencapture

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419

1 Answers1

1

It is difficult to answer without having all the code. And code is almost always better than a screenshot.

My guess is that you loaded the dataset X2019THBrier manually in RStudio. Thus you can access it in chunks, in the current R session, but not in the knitted R session.

You need to write commands to load the data. As you are loading an XLSX file, you might want to install the openxlsx package, and use the openxlsx::read.xlsx() command.

Ewen
  • 43
  • 5