Can't figure out why describeBy function will not work.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't figure out why describeBy function will not work.

jcrosbie
This post has NOT been accepted by the mailing list yet.
I tried to create sample data but all the sample data I created worked.

I have a data frame  which I'm using the describeBy funciton on. The grouping  column looks like Col2 below.

col1<- seq(1, 10, by=1)
col2<-c("SON02", "SON03","SON02", "SON03","SON02", "SON03","SON02", "SON03","SON02", "SON03")
df1<-data.frame(col1, col2)
describeBy(df1, df1$col2)

This test case runs correctly.

In addition, if I remove the column from my table which looks like col2 and create some fake column to group by describeby will work.

Does anyone know why I'm getting this error?
Error in FUN(data[x, , drop = FALSE], ...) :
  non-numeric argument to 'describe'


Reply | Threaded
Open this post in threaded view
|

Re: Can't figure out why describeBy function will not work.

jcrosbie
This post has NOT been accepted by the mailing list yet.
Ok wierd. I have restarted my computer and re-installed a few of the packages and now it's working.