I'm relatively new to R. I have a dataset which contains average group sizes which I think may be the problem. I have them in a csv file and they are typed as '1-3' and '4-6' for example. When I try to plot this using the code:
plot(mydata$Group.Size, mydata$Time.spent.vigilant..seconds., xlab="Group size", ylab="Time spent vigilant, seconds", main="Group size vs time spent vigilant")
I get the error
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
I have tried to expand my plot window but keep getting the error.