[R] Drop non-integers

2010-11-17 Thread Sam Albers
Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat - as.data.frame(runif(7, 3, 5)) dat$cat - factor(c(1,4,13,1,4,13,13A)) dat runif(7, 3, 5) cat 1 3.880020 1 2 4.062800 4 3 4.828950 13 4 4.761850 1 5

Re: [R] Drop non-integers

2010-11-17 Thread David Winsemius
On Nov 17, 2010, at 6:27 PM, Sam Albers wrote: Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat - as.data.frame(runif(7, 3, 5)) dat$cat - factor(c(1,4,13,1,4,13,13A)) dat runif(7, 3, 5) cat 1 3.880020 1 2 4.062800 4 3

Re: [R] Drop non-integers

2010-11-17 Thread Duncan Murdoch
On 17/11/2010 6:27 PM, Sam Albers wrote: Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat- as.data.frame(runif(7, 3, 5)) dat$cat- factor(c(1,4,13,1,4,13,13A)) dat runif(7, 3, 5) cat 1 3.880020 1 2 4.062800 4 3

Re: [R] Drop non-integers

2010-11-17 Thread Sam Albers
On Wed, Nov 17, 2010 at 3:49 PM, David Winsemius dwinsem...@comcast.netwrote: On Nov 17, 2010, at 6:27 PM, Sam Albers wrote: Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat - as.data.frame(runif(7, 3, 5)) dat$cat -

Re: [R] Drop non-integers

2010-11-17 Thread David Winsemius
On Nov 17, 2010, at 6:57 PM, Sam Albers wrote: On Wed, Nov 17, 2010 at 3:49 PM, David Winsemius dwinsem...@comcast.net wrote: On Nov 17, 2010, at 6:27 PM, Sam Albers wrote: Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat -