--- Mallika Veeramalai <[EMAIL PROTECTED]> wrote: > > Hi All, > > Sorry for this basic question as I am new to this R. > I would like to know, > is it possible to consider a matrix with some > columns having numeric data > and some other's with characters (strings) data? > How do I get this type of > data from a flat file. > > Thanks very much, > mallika
If I understand the question the answer is NO. A matrix must be of one type of data. I think that what you want is a data.frame wich allows mixed categores of data. Try this to see the difference. a <- c('a','b','c') b <- c( 1,2,3) aa <- cbind(a,b) aa class(aa) bb <- data.frame(a,b) bb class(bb) ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.