[R] Export data frame of high dimension to txt

Jan van der Laan djvanderlaan at gmail.com
Thu Jul 1 13:07:48 CEST 2010


Loukia,

Do you mean that the lines are wrapped when you open the file in
Notepad? Notepad seems to wrap lines after 1024 characters. Try to
open the file in a more decent editor, e.g. notepad++, gvim, ... and
there are probably plenty more editors available.

Hope this helps.
Jan


On Thu, Jul 1, 2010 at 9:50 AM, Loukia Spin. <loukiamar at hotmail.com> wrote:
>
> I managed with success to export a data frame of 367 columns and 37 rows to a txt file, but unfortunately I couldn't manage the same with the transposed data frame. Specifically, it seems like the notebook cannot "read" correctly 367 columns, so it reads the first 145 columns and it folds down the rest of them and consequently it folds down the respective data.
>
> f=format.data.frame(rev,trim=F,digits=NULL,nsmall=3, ## rev is the data frame of 37 rows and 367 columns ##
> justify="centre",zero.print=F,drop0trailing=T);f
>
> write.table(f,file="C:/Program Files/R/R-2.11.0/genes as rows.txt",
> row.names=T,sep="\t",quote=F,dec=".",col.names=NA,append=T)
>
> Is there something wrong?
>
> Thank you in advance,
> Loukia Maria S.
>
> _________________________________________________________________
> Hotmail: Αξιόπιστο email με την ισχυρή προστασία ενάντια στην ανεπιθύμητη αλληλογραφία που παρέχει η Microsoft.
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at 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.
>
>



More information about the R-help mailing list