Skip to content

scan empty strings or data without NAs??

1 message · Jens Oehlschlägel-Akiyoshi

#
I just discovered that it is not possible to read in data with scan() and to
have no na.strings at all

  scan(na.strings=NULL)

gives an error message "invalid na.strings value".

Furthermore it is not possible to read in empty strings, without automatic
conversion to 'NA', because of

    if (!missing(sep))
        na.strings <- c(na.strings, "")

within scan()

As scan() is a very basic function in R, I wish it would allow specifying
na.strings=NULL and importing empty strings. Is there any specific reason
not to allow this ?

Regards



--
Dr. Jens Oehlschl?gel-Akiyoshi
MD FACTORY GmbH
Bayerstrasse 21

80335 M?nchen

Tel.: 089 545 28-27
Fax.: 089 545 28-10
http://www.mdfactory.de

Standard Disclaimers: Opinions expressed here are personal
and are not otherwise represented.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._