0

When I write the following code in markdown

summary(supermarket_sales_Sheet1)

and hit the knit button ,I got the following message:-

Error in summary(supermarket_sales_Sheet1) : 
  object 'supermarket_sales_Sheet1' not found
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> summary
Execution halted

What's the problem please?

zx8754
  • 46,390
  • 10
  • 104
  • 180
  • 1
    The most likely reason is that `supermarket_sales_Sheet1` is an object which exists only in your global environment. When you knit the Rmd is executed in a fresh and clean R session. Hence, only objects which are created in the Rmd could be used. See e.g. https://stackoverflow.com/a/42341558/12993861 – stefan Nov 28 '21 at 08:37
  • Yes, create supermarket_sales_Sheet1 in a chunk above the one where you summarize it – Yacine Hajji Nov 28 '21 at 09:00
  • it worked , thank you very much – Marwa Abd Elfattah Nov 28 '21 at 09:29

0 Answers0