You have a list as output from 'lapply'. To convert back into a matrix use:
do.call(rbind, var21)
On Sun, Jun 28, 2009 at 9:01 PM, Shaan Glaz wrote:
> Hi!
>
> I want to print the output all together with a single column name
>
> s21<-c(1:1000);
> var21<-lapply(s21,function(x){
>ns<-rnorm
Hi!
I want to print the output all together with a single column name
s21<-c(1:1000);
var21<-lapply(s21,function(x){
ns<-rnorm(78,8,9);
n<-length(ns);
Mn<-mean(ns)
Sn2<-var(ns)
return(cbind(x,Mn,Sn2));
});
var21
but my code is giving me somewhat like the following
[[1]] x Mn
2 matches
Mail list logo