Hi,

Here's a patch to the readChar manual page (R-trunk as of today) that 
better clarifies readChar's return value. It could use some work as I'd 
also like to add some text about using nchar() to find the length of the 
string that readchar() returns, but I'm unsure which of type="bytes" or 
type="chars" to mention. Is it type="chars"?

Index: src/library/base/man/readChar.Rd
===================================================================
--- src/library/base/man/readChar.Rd    (revision 41943)
+++ src/library/base/man/readChar.Rd    (working copy)
@@ -57,8 +57,8 @@
  }

  \value{
-  For \code{readChar}, a character vector of length the number of
-  items read (which might be less than \code{length(nchars)}).
+  For \code{readChar}, a character vector of length 1 with the number
+  of characters less than or equal to nchars.

    For \code{writeChar}, a raw vector (if \code{con} is a raw vector) or
    invisibly \code{NULL}.


Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to