Im trying to complete a case study for the Google certificate program and need help with Rstudio syntax

Hi, I'm trying to complete a case study for Google certs capstone and I am new to Rstudio. I'm following along with a tutorial on youtube but I'm running into some errors and was hoping to reach out for some help. I have loaded a dataset and I'm trying to create a basic plot comparing users' status and gender. I will post the codes and errors below. If anyone can help that would be great. Thank you for your time and consideration.

plot(Divvy_Trips_2019_Q1$usertype, Divvy_Trips_2019_Q1$gender)
col = "#cc0000", # Hex code for datalab.cc red
pch = 19, # Use solid circles for points
main = "Divvy_Trips_2019_Q1: usertype vs. gender"
xlab = "usertype"
ylab = "gender"

Console

plot(Divvy_Trips_2019_Q1$usertype, Divvy_Trips_2019_Q1$gender)
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
5: In min(x) : no non-missing arguments to min; returning Inf
6: In max(x) : no non-missing arguments to max; returning -Inf

Welcome to the forum.

Nice problem report but I think we need some sample data. See FAQ: How to do a minimal reproducible example ( reprex ) for beginners
or a handy way to supply sample data is to use the dput() function. See ?dput. If you have a very large data set then something like head(dput(myfile), 100) will likely supply enough data for us to work with.

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.