[R] Selecting variables from a data.frame

Till Baumgaertel till.baumgaertel at epost.de
Tue Dec 31 02:55:03 CET 2002


Hi all,

currently I'm working with physical data stored in a data.frame. I have
N observations, typically 100-300 per data set.
Each row in a set holds M (typically 2100) variables which represent a curve.

For linear discriminant analysis I chose first to do a wavelet transform
(because M >> N) and then feed the transformed data (of level L) in lda.

This works fine (e.g. error < 0.01) if I take all variables or a subset
of consecutive variables. But now I want to take only the even numbered
variables (1st, 3rd, 5th,...) and then do the wavelet transform.

My question: which is the most elegant way to select the desired variables?


Or in general: I'd like to select 2^m variables starting with the n-th variable
of the original set with a distinct distance d. If m==3, n==5 and d==3 this
should get me the following variables:
5, 8, 11, 14, 17, 20, 23, 26
And for n==1 d==2 we would get the first problem.

I would appreciate your help very much!

Thanks,
Till


________________________________________
Abos online bestellen. Oder Leser werben und Prämie aussuchen. http://www.epost.de/aboservice




More information about the R-help mailing list