Hi,
Try:
mat <-
as.matrix(read.csv("R.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t",row.names=1))
pdf("Hist_colwise.pdf")
lst1 <- lapply(seq_len(ncol(mat)),function(i) {x<- mat[,i,drop=FALSE]; hist(x,
main=paste("Histogram of", colnames(x)))})
dev.off()
##or may be this would be another way
Hi,
If you meant to convert the matrix to a 3D array, check this link:
http://stackoverflow.com/questions/9572656/how-to-convert-matrix-into-array
A.K.
On Monday, May 19, 2014 2:18 AM, Effat Habibi wrote:
Dear Sir/ Madam,
I have a problem with converting a matrix (247 rows, 16 columns) t
On Sun, 18 May 2014 08:18:18 PM Effat Habibi wrote:
> Dear Sir/ Madam,
>
> I have a problem with converting a matrix (247 rows, 16 columns) to
an array
> in R.
>
> Would you please help me in this regard.
>
Hi Effat,
"A two-dimensional array is the same thing as a matrix."
>From the help page
3 matches
Mail list logo