Hi! I am working on an assignment for my data science minor and I ran into an error.
When I run this code, I expect the output to be a histogram of the height of people with diabetes in the data set.
However, when I actually run the code, I get an error message saying "Error in ggplot(just_height, aes(x = height)) : could not find function "ggplot"
The data set is public and accessible to everyone, but you need to use the diabetes data set rather than a built in dataset.
library(reprex)
diabetes <- read.csv("https://raw.githubusercontent.com/malcolmbarrett/au-stats412-612-01-reading_data/master/diabetes.csv")
just_height <- diabetes[, "height"]
ggplot(just_height, aes(x = height)) +
geom_histogram()