You can try this also:
as.data.frame(lapply(subset(data, X == 'a'), '[', drop = TRUE))
On Wed, Mar 10, 2010 at 6:35 PM, clee wrote:
>
> If anyone can help with this, I would greatly appreciate it.
>
> When I subset a dataframe, and then create a table of on of the column
> variables, the levels
Try
data2$X<-factor(data2$X)
By the way, avoid call data as "data", matrix as "matrix", vector as
"vector".
cheers
milton
On Wed, Mar 10, 2010 at 4:35 PM, clee wrote:
>
> If anyone can help with this, I would greatly appreciate it.
>
> When I subset a dataframe, and then create a table of on
If anyone can help with this, I would greatly appreciate it.
When I subset a dataframe, and then create a table of on of the column
variables, the levels of that variable are retained from the parent
dataframe. Anyone know how to
for example, say I have data like so:
data:
X Y
a 2
b
3 matches
Mail list logo