Hi,
Try ?paste()
dat1 <- read.table(text="apkkaakafmfffakkannpaaapkacfaapfd
kpaaakaaaafkpkfbfakaaofakapkpppfcgaanfpfakaappffak
fkpkfbfakaaofakapkpppfcgaanfpfa
aakaaaafkpkfbfakaaofakapkpppfc",sep="",header=FALSE,stringsAsFactors=FALSE)

res <-  paste(dat1[,1],collapse="")
A.K.


So I have a 19x1 column vector. Each row of the column vector contains a 
string. For example, the (1,1) entry contains 
"apkkaakafmfffakkannpaaapkacfaapfd" and the (2,1) entry contains 
"kpaaakaaaafkpkfbfakaaofakapkpppfcgaanfpfakaappffak" and so on. 

How can I concatenate the rows so that I just have a 1 by 1 cell
 containing the strings from the first, second, third, ..., nineteenth 
row concatenated without any spaces between them? 

E.g., concatenating the first two rows should yield: 

"apkkaakafmfffakkannpaaapkacfaapfdkpaaakaaaafkpkfbfakaaofakapkpppfcgaanfpfakaappffak"
 

Thanks.

______________________________________________
R-help@r-project.org 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.

Reply via email to