Error message says ggplot2 not recognized

Hello - I'm combining just two months of data to get a feel for using the readr(), bind_rows(), and aes geom_point functions. Got as far as binding rows! But I am repeatedly getting an error message saying the ggplot2 function isn't recognized.

Domain: Posit Cloud

Coding and error message:

ggplot2(combined_df, aes(x = ride_length, y = day_of_week)) +

  • geom_point() +
  • labs(x = "Ride Duration", y = "Day of the Week", title = "What Days Have the Longest Rides?")
    Error in ggplot2(combined_df, aes(x = ride_length, y = day_of_week)) :
    could not find function "ggplot2"

Hi @AT50Plus ,

It's a typo. The library is ggplot2, but the function is ggplot(), not with 2


It will only take it with a 2 in the library() function, but in the syntax below it only works without the 2. Go figure. Thanks for your reply.

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.