Hi! I'm new to R and I'm having problems plotting my categorical data. I'm using the as.factor function to make my variable, which is not numeric, into something that can be graphed but I keep getting this error:
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
I'm using preloaded data and Im typing it in as
as.factor(condition)
plot(protest$condition)
That worked! the bar graph doesn't show me the exact number of individuals in each variable. Do you know a function to show how many of each variables there are in categorical data?