i have data set read .csv file. after editing work, need write .txt file (i) quotes removed (ii) every na in whole file replaced asterisk, *, , (iii) first row (variable names) excluded.
the following scripts, far, remove quotes , wondering how can (ii) , (iii) can added or may done.
write.table(ped5, "ped5.txt" ,row.names=false) ped5 <- read.table("ped5.txt", header=true) write.table(ped5, "ped7.txt", row.names=false, quote=false) any appreciated!
for (ii) use na = "*" , (iii) col.names=false.
so:
write.table(ped5,"ped7.txt",row.names=false,quote=false, na="*", col.names=false) it's find on help page write.table (?write.table).
Comments
Post a Comment