data(vehicles)
X <- vehicles[, 1:11]
Y <- vehicles[, 12:15]
X <- scale(X)
Y <- scale(Y) # The scales of Y are vastly different, so scaling is reasonable here
m <- rrenv(X, Y, 4, 2)
m
X <- as.matrix(X)
pred.res <- pred.rrenv(m, X[2, ])
pred.res
Run the code above in your browser using DataLab