|
|
This post has NOT been accepted by the mailing list yet.
Hi,
I am trying to remove columns from the example data "a" given below.
Shouldn't the line below the data work? Please let me know what I am doing wrong.
a <- dput(new2[1:5,c(6:10)])
structure(list(Last.Name.x = c("Bell", "Procell", "Denney", "Woods",
"Bates"), First.Name.x = c("Amanda", "Jordan", "Thomas", "David",
"Charles"), Lab.01.Bonus..2000589. = c(2L, 2L, 0L, 0L, 0L), Lab.01.Entrance..1999102. = c(10L,
8L, 0L, 0L, 0L), Lab.02.Entrance..1999133. = c(10L, 10L, 6L,
0L, 0L)), .Names = c("Last.Name.x", "First.Name.x", "Lab.01.Bonus..2000589.",
"Lab.01.Entrance..1999102.", "Lab.02.Entrance..1999133."), row.names = c(NA,
5L), class = "data.frame")
# why doesn't this work?
a[, -c("First.Name.x", "Last.Name.x")]
Thanks ahead of time.
|