i have two variable> pyar[1] "M" "12" "34" "13"> gita[1] "U" "22" "33" "44" want to append gita object below pyar object as & want to take in anther variable "M" "12" "34" "13" "U" "22" "33" "44" & write it in table fashion inside file -- View this message in context: http://r.789695.n4.nabble.com/appending-variable-s-values-in-table-like-fashion-tp4360966p4360966.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2012-Feb-06 15:49 UTC
[R] appending variable's values in table like fashion
On Feb 6, 2012, at 6:29 AM, sagarnikam123 wrote:> i have two variable >> pyar > [1] "M" "12" "34" "13" >> gita > [1] "U" "22" "33" "44" > want to append gita object below pyar object as > & want to take in anther variable >You could make a character matrix: cmat <- matrix(c(pyar,gita), nrow=2, byrow=T)> "M" "12" "34" "13" > "U" "22" "33" "44" > > & write it in table fashion inside filewrite.table(cmat, row.names=F, col.names=F) "M" "12" "34" "13" "U" "22" "33" "44" -- David Winsemius, MD West Hartford, CT