Uwe Ligges wrote:
>
>> Of course this is a trivial task:
>> 
>> text.in <- readLines(file.in)
>> matrix.in <- strsplit(text.in, "[ \t]+")
> 
> You probably want
> 
> write.table(t(read.table(file.in)), file = file.out, row.names = 
> FALSE, col.names = FALSE)
>
Unfortunately, it doesn't work. In fact, read.table(file.in) returns
an error:

Erro em scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  linha 1 não tinha 1362 elementos

which means
  line 1 does not have 1362 elements

(whatever that means!)

Alberto Monteiro

______________________________________________
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