Re: [R] extracting column and regular interval in R

2012-09-18 Thread eliza botto
thankyou Berend. regards eliza > Subject: Re: [R] extracting column and regular interval in R > From: b...@xs4all.nl > Date: Tue, 18 Sep 2012 17:43:15 +0200 > CC: r-help@r-project.org > To: eliza_bo...@hotmail.com > > > On 18-09-2012, at 16:55, eliza botto wrote:

Re: [R] extracting column and regular interval in R

2012-09-18 Thread Berend Hasselman
On 18-09-2012, at 16:55, eliza botto wrote: > > Dear R users, > i have a matrix with 31 rows and 444 columns and i want to extract every 37th > column of that matrix starting from 1. more precisely i want to select > columns 1, 38,75, 112 and so on. then doing the same by starting from column

Re: [R] extracting column and regular interval in R

2012-09-18 Thread eliza botto
thnkyou very much micheal. i worked!!! regards eliza > From: michael.weyla...@gmail.com > Date: Tue, 18 Sep 2012 15:58:31 +0100 > Subject: Re: [R] extracting column and regular interval in R > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > > x[c(TRUE, rep(FALSE

Re: [R] extracting column and regular interval in R

2012-09-18 Thread R. Michael Weylandt
x[c(TRUE, rep(FALSE, 36)),] and let recycling work its magic! To concretize: x <- 1:100 x[c(TRUE, rep(FALSE, 4))] Cheers, Michael On Tue, Sep 18, 2012 at 3:55 PM, eliza botto wrote: > > Dear R users, > i have a matrix with 31 rows and 444 columns and i want to extract every 37th > column of

[R] extracting column and regular interval in R

2012-09-18 Thread eliza botto
Dear R users, i have a matrix with 31 rows and 444 columns and i want to extract every 37th column of that matrix starting from 1. more precisely i want to select columns 1, 38,75, 112 and so on. then doing the same by starting from column number 2(2,39,76,113...). i know that there is a ma