Re: [R] delete a entire vector of a dataframe

2006-09-22 Thread Adrian DUSA
This works too: t.d$V712 <- NULL On Thursday 21 September 2006 22:28, Gavin Simpson wrote: > On Thu, 2006-09-21 at 20:01 +0200, Thomas Preuth wrote: > > delete a entire vector of a dataframe > > > > Hello, > > > > i want to delete a vector and tried "rm (t.d$V712)". This did not work, > > message

Re: [R] delete a entire vector of a dataframe

2006-09-21 Thread Gavin Simpson
On Thu, 2006-09-21 at 20:01 +0200, Thomas Preuth wrote: > delete a entire vector of a dataframe > > Hello, > > i want to delete a vector and tried "rm (t.d$V712)". This did not work, > message was, could not find variable. I thought the $ defines the vectro > in a dataframe, when I just type "t

Re: [R] delete a entire vector of a dataframe

2006-09-21 Thread David Barron
There is a function remove.vars in the gdata package, or you can do this: > > dt<-data.frame(a=(1:5),b=(6:10),c=(11:15)) > dt a b c 1 1 6 11 2 2 7 12 3 3 8 13 4 4 9 14 5 5 10 15 > dt[["a"]] <- NULL > dt > dt b c 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15 If you know it is the first colu

[R] delete a entire vector of a dataframe

2006-09-21 Thread Thomas Preuth
delete a entire vector of a dataframe Hello, i want to delete a vector and tried "rm (t.d$V712)". This did not work, message was, could not find variable. I thought the $ defines the vectro in a dataframe, when I just type "t.d$V712" the content of this vector is displayed. Greetings, Thomas