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() %>%
summarize(max_steps=max(TotalSteps),max_distance=max(TotalDistance),max_calories=max(Calories))
View(Activity_summary)

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

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.