-----Urspr??ngliche Nachricht-----
Von: Jacques VESLOT [mailto:jacques.veslot at cirad.fr]
Gesendet: Donnerstag, 09. September 2004 12:38
An: r-help at stat.math.ethz.ch
Betreff: [R] Indexing dataframe
I am sorry to ask such question, but I can't find a solution...
I have a dataframe 'd2004' and I want to remove two columns:
'd2004$concentration' and 'd2004$stade".
I could do it just as follows:
[1] "Localite" "Date" "parcelle" "maille"
"presence.plant" "concentration" "stade.culture"
[8] "stade" "Trou" "Horizon" "Profondeur"
d2004 <- d2004[, -c(6, 8)]
but I'd like to use column names (to avoid finding column
numbers each time).
I cannot find an easy way to operate...
I wonder why that works:
d2004 <- d2004[, -c("concentration", "stade")]
Thanks...
Jacques VESLOT / CIRAD