[R] gene name problem in Excel, and an R analogue

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Sep 14 09:28:50 CEST 2016

What, like the colClasses argument? Darn that ellipsis and its consequent deferred documentation... but it _is_ mentioned in passing in ?read.fwf.
Sent from my phone. Please excuse my brevity.

On September 13, 2016 10:54:44 PM PDT, Erich Neuwirth <erich.neuwirth at univie.ac.at> wrote:
>Since many people commenting on the gene name problem in Excel
>essentially tell us
>This could never have happened with R
>I want to show you a somewhat related issue:
>ff1 <- tempfile()
>cat(file = ff1, "12345", "1E002", sep = "\n")
>xdf1 <- read.fwf(ff1, widths = 5, stringsAsFactors=FALSE)
>ff2 <- tempfile()
>cat(file = ff2, "12345", "1E002","1A010", sep = "\n")
>xdf2 <- read.fwf(ff2, widths = 5, stringsAsFactors=FALSE)
>in xdf1, the variable is numeric, in xdf2, it is a character variable.
>Of course, in hindsight this makes sense. But the problem is similar to
>Excel problem where something which could be a date is interpreted as a
>A possible solution with my read.fwf problem would be to have a
>forcing variables to be read as strings.
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list