0

I am new to "R" and I am trying to create a R Markdown file.

In the environment pane, my dataframe is names "crimes".

In the code chunk area, I've tried View(crimes) and I consistently receive this error:

Error in summary(crimes) : object 'crimes' not found. Calls: ...withVisible -> eval_with_user_hanlders -> eval -> eval -> summary Execution halted

enter image description here

enter image description here

enter image description here

I am expecting to see a tibble of my data. It works in the console area, but not in R Markdown.

Thank you for helping!

stefan
  • 90,330
  • 6
  • 25
  • 51
  • 1
    Welcome to SO! Objects in your global environment are not available when you knit an Rmd. When you knit an Rmd file it is "run" or rendered in a fresh R session, i.e. you have to load your dataset inside the Rmd. – stefan May 11 '23 at 20:01

1 Answers1

0

The first skill when learning Programming is "How to ask better question?"

Please note that posing screenshots of code is generally discouraged here on Stackoverflow see this and elsewhere in general. It is not readable. Second, you are using Rstudio, from what I can see. Have you saved session history by any chance? Did you reload the session? I will never know from your question. Hence, When you are asking a question, make sure it is "Exemple Complet Minimal" (in French), or "Complete Minimal Example". Everything is hard to say from your question. It says line 19, but I do not see anything. Please read this

txvnkcos
  • 9
  • 3