Error when trying to Knit an Notebook

Hi I'm trying to knit a notebook. I'm very new to R. I keep getting an error 'no file or directory found'
I also get an error that a dataset within a chunk code cannot be found but when I run the chunk it works fine. object 'dailyActivity_merged' not found
Activity_summary <- dailyActivity_merged %>%
group_by(Id) %>%
drop_na() %>%

When you knit an Rmd document the code gets executed in a clean environment other than the one you are currently working on, so you need to include the code needed to import/create any data frame you are using in your code. Otherwise the data is not available on the knitting environment.

1 Like