Displaying 1 result from an estimated 1 matches for "x2to".
Did you mean:
x2go
2009 Jun 13
2
How to write loop
Dear all,
I want to do the following process as a loop ( to run
automatically with dimension of X, here 50). How can I do that? Your
cooments will be highly appreciable.
Alex
*# Code:*
library(lars)
library(chemometrics)
X<-matrix(rnorm(2500),ncol=50)
dim(X)
# [1] 50 50
X1<-X[,2:dim(X)[2]] # I have taken out first column
dim(X1)
#[1] 50 49
X2<-X1[2:dim(X1)[1],] #