I'm trying to create a barplot with the following code:
# Make an ID variable to keep track of each person
person_id <- seq(1, 20, 1) # Enter folks ’ responses into R
r_difficulty <- c("moderate",
"moderate",
"easy",
"difficult",
"very difficult",
"very difficult",
"difficult",
"very easy",
"moderate",
"very difficult",
"difficult",
"easy",
"moderate",
"difficult",
"very difficult",
"moderate",
"difficult",
"easy",
"difficult",
"very difficult")
# Combine the variables into a data frame object
data <- data.frame(person_id , r_difficulty ).
When I try to create a barplot, I receive the error "height must be a vector or a matrix. Im not sure what information I am missing here. Thanks!