[R] Confusing error statement

Ben Bolker bbolker at gmail.com
Fri Oct 22 15:33:50 CEST 2010


 <Kurt_Helf <at> nps.gov> writes:

> 
> Greetings
>      Using the following command I've been trying to subset a dataframe of
> counts of an organism to compute the sizes of groups for use as a
> predictor:
> 
> Hs.patches <- as.data.frame(with(Hs.long,
>       table(Cave,Year,Month,Region,Plot,)))
> 
> I am getting the following error message that I do not understand:
> 
> ERROR:  argument is missing, with no default

   There seems to be a spurious comma in your 'table' call.
(Also, I don't believe that's actually the precise error you
got -- it's good to cut and paste errors exactly, in case you
omit some important detail when transcribing)

> x <- 1:3
> y <- 2:4
> table(x,y,)
Error in table(x, y, ) : argument is missing, with no default



More information about the R-help mailing list