Displaying 1 result from an estimated 1 matches for "t0002".
Did you mean:
0002
2008 Feb 08
4
Subsetting a data.frame degenerates at one column?
...of some use to people other than me.
One obstacle I encounter is that, when I select one column out of a
data.frame, the result is no longer a data.frame. So, say I've got,
in data frame 'input'
disk1 disk2 disk3 disk4
T0000 0 1 0 4
T0001 0 1 0 5
T0002 0 1 0 5
T0003 0 2 0 4
T0004 0 2 0 3
T0005 0 1 0 3
T0006 0 0 0 3
and somewhere I've noted a list
targets <- c('disk2','disk3')
I can say
input[,targets]
disk2 disk3
T0000 1 0
T00...