Dear Pascal,
thanks for replying. it is working about it only executes the first set
of column, it does not bring about all the sets of columns.
any thoughts??
eliza
> Date: Tue, 25 Dec 2012 14:12:01 +0900
> From: kridox at ymail.com
> To: eliza_botto at hotmail.com
> CC: r-help at r-project.org
> Subject: Re: [R] for loop not working
>
> Hello,
>
> ?seq
>
> seq(i,444,37)
>
> with i = 1,2,3...37
>
> HTH
> Pascal
>
>
> Le 25/12/2012 14:03, eliza botto a ?crit :
> >
> > dear R family,i have a matrix of 444 columns. what i want to do is
> > 1. starting from column 1 i want to select every 37th column on the
way. more precisely i want to select column 1, 38,75,112,149 and so on.
> > 2.starting from column 2, i again want to select every 37th column.
which means 2,39,76,113,150 and so on.
> > similarly starting from 3 till 37th column.
> > i have tried following loop command which is not working.can anyone
plz see whats wrong in that?
> > function(i) {
> >
> >
> >> a[,c(TRUE, rep(FALSE,1))]
> > extremly sorry for bothering you once again..
> > eliza
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide