[R] read.xls without row number, column numbers, or factors

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Jul 2 16:34:27 CEST 2019


On Mon, 01 Jul 2019 20:13:34 -0400
asteya using mathnmaps.com wrote:

> Is there a way to use read.xls to copy a portion of a single row of
> an XLS spreadsheet to a list, without getting assigning row and
> column numbers, and, if the data consists of strings, without
> assigning levels?

If you mean the read.xls function from gdata package, it uses read.csv
to read the temporary CSV file produced from the XLS file and passes its
arguments using ..., so it should be possible to pass as.is = TRUE and
prevent factors from appearing.

It doesn't seem to be possible to prevent row and column names from
being produced (except passing header = F if your CSV doesn't have a
header).

The readxl[*] package offers somewhat saner defaults, so you might want
to try that, too.

-- 
Best regards,
Ivan

[*] https://readxl.tidyverse.org/



More information about the R-help mailing list