Hellping a colleague with R in a Sage Cell, so I've chosen R as the language and used the main site for the Sage Cell. i don't know R very well and she doesn't know Sage very well. ;-)
Code:
age <- c(25, 30, 56)
gender <- c("male", "female", "male")
weight <- c(160, 110, 220)
mydata <- data.frame(age,gender,weight)
ggplot(mydata, aes(age,weight))+ geom_point()
yields a traceback that ends in
RRuntimeError: Error in ggplot(mydata, aes(age, weight)) :
could not find function "ggplot"
I understood that the "ggplot2" library was pre-installed.
Can anybody see what I've got wrong?
Thanks,
Rob