0

rom a tutorial I'm using, the exercise is to run this code below.

library(datasets)

data(iris)

View(iris)

library(GGally)

ggpairs(iris, mapping=ggplot2::aes(colour = Species))

However, when I run it I get the following error:

Error in ggpairs(iris, mapping = ggplot2::aes(colour = Species)) : 
  could not find function "ggpairs"

I'm not sure what exactly the problem is and I can't seem to find any similar error solution. Any help would be appreciated.

user438383
  • 4,338
  • 6
  • 23
  • 35
Lisa Write
  • 13
  • 5

1 Answers1

1

I'm only able to reproduce your error if I don't call library(GGally). Since you're calling it, I suspect you haven't installed it yet with install.packages("GGally")

Patrick
  • 11
  • 1