in R, question about generate table
- by alex
a = matrix(1:25,5,5)
B = capture.output(for (X in 1:5){
A = c(min(a[,X]),quantile(a[,X],0.25),median(a[,X]),quantile(a[,X],0.75),max(a[,X]),mean(a[,X]),sd(a[,X])/m^(1/2),var(a[,X]))
cat(A,"\n")
})
matrix(B,8,5)
what i was trying to do is to generate a table which each column has those element in A and in that order. i try to use the matrix, but seems like it dont reli work here...can anyone help
1 2 3 4 5
min
1st quartile
median
SEM
VAR
THIS IS WHAT I WANT THE TABLE LOOKS LIKE ..