Why geom_col could not be found even we have ggplot2?

Hi All, i am a new user of R programming and part of this community.
We are running exactly the same code in two different computer. We both installed ggplot2 and the other packages which are necessary to use. When i run the code geom_col is working well but in the other computer it gives an error.

Let me write down the code:

output$plot1 <- renderPlot({
    ggplot(output2t()) +
      geom_col(aes(x = as.character(`Cell ID`),value, fill=v), position = "dodge") +
      labs(x = "cell_id")

and the error is could not find the function 'geom_col' , since it works when we replace the code with geom_bar.

Strange thing for me is, how is possible for same programs can't run the same code? Is there any one who can inform us on this?

Thank you!

geom_col appeared in ggplot2 version 2.2.0.

Are you sure you have installed and loaded the same version on the two computers ?

You can check with packageVersion("ggplot2") that will print the version number the ggplot2 found in current libraries.

2 Likes

3 posts were split to a new topic: how do I update ggplot2?