Re: [R] subsetting of a data.frame

2009-05-21 Thread culpritNr1
Hi Sarah and Jorge, ncol(). How elegant! Thank you. Jorge Ivan Velez wrote: > > Dear culprit > Try this: > A[ , 4:ncol(A) ] > > HTH, > > Jorge > > > > On Thu, May 21, 2009 at 12:06 PM, culpritNr1 > wrote: > >> >> Hello everybody >> >> How do you subset a data.frame when your bounda

Re: [R] subsetting of a data.frame

2009-05-21 Thread Jorge Ivan Velez
Dear culprit Try this: A[ , 4:ncol(A) ] HTH, Jorge On Thu, May 21, 2009 at 12:06 PM, culpritNr1 wrote: > > Hello everybody > > How do you subset a data.frame when your boundaries are a combination of > explicit and implicit limits? > > For example, I need to subset from the fourth (explicit

Re: [R] subsetting of a data.frame

2009-05-21 Thread Sarah Goslee
You can for example use ncol(A) to get the number of columns. Sarah On Thu, May 21, 2009 at 12:06 PM, culpritNr1 wrote: > > Hello everybody > > How do you subset a data.frame when your boundaries are a combination of > explicit and implicit limits? > > For example, I need to subset from the four

[R] subsetting of a data.frame

2009-05-21 Thread culpritNr1
Hello everybody How do you subset a data.frame when your boundaries are a combination of explicit and implicit limits? For example, I need to subset from the fourth (explicit) to the last (implicit) column a data.frame named A. In other languages you would do A[ , 4:]. Would anybody show me the