Antonio, Fabio Di Narzo
2006-Jun-04 16:42 UTC
[R] strange (to me) ncolumns default value in 'write'
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060604/a8854663/attachment.pl
Martin Maechler
2006-Jun-05 09:42 UTC
[R] strange (to me) ncolumns default value in 'write'
>>>>> "AntonioF" == Antonio, Fabio Di Narzo <antonio.fabio at gmail.com> >>>>> on Sun, 4 Jun 2006 18:42:35 +0200 writes:AntonioF> Hi all. AntonioF> In 'write' documentation, one can read: AntonioF> write(x, file = "data", AntonioF> ncolumns = if(is.character(x)) 1 else 5, AntonioF> append = FALSE, sep = " ") AntonioF> Now my question is: why the default value of 1column for character vectors AntonioF> and the special value '5' for non character vectors? well, most of us have five fingers per hand, so many consider '5' to be a 'nice' number :-) For R, the main reason of using this default, was that S already had it. And S has had it not only for the above reason, but I guess also because nicely, 5 * 16 = 80, and 80 used to be the customary terminal width in the 70s and 80s, i.e., the good old times S was created. AntonioF> Nice sunday to all, and Pentecoste Monday, for those with an extra free day like me. Martin Maechler, ETH Zurich AntonioF> Antonio, Fabio Di Narzo. AntonioF> Note: this is just curiosity. Don't read as: "WHY? WHY!?!?", but just as AntonioF> "why?"