[R] sample matrix as a new object

Carlos Mauricio Cardeal Mendes mcardeal at ufba.br
Tue Dec 13 15:31:33 CET 2005


Please, I´d like to store this sample matrix as a new object. How can I 
do this ?

pulse <- c(67, 67, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70, 70, 71, 
71, 72, 72, 73, 74)
m <- NULL
x <- 0
for (i in 1:5)
{
x <- sample(pulse,3)
m <- mean(x)
cat(x,m,"\n")
}

Thanks,
Mauricio




More information about the R-help mailing list