what i have to do when Running code from markdown does not return results

I'm using Rstudio's Rmarkdown for assignment
I made such that code

gapminder%>%group_by(continent) %>% summarize(n=n_distinct(country),.groups="drop_last")

when I run this code at my Rstudio console
It returned result well. But when run on Rmarkdown It doesn't return result
please help me!

It would be better if you would have provided a minimal working example of your Rmd. As the provided code works fine I could just guess that you forgot to attach the packages inside your Rmd (having them attached to your R session is not enough, as the Rmd is rendered in a fresh and clean R session). Therefore make sure that your Rmd includes a code chunk to attach the packages, i.e.


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.