awalker89 / openxlsx

R package for .xlsx file reading and writing.
Other
364 stars 79 forks source link

[Bug] check.names of read.xlsx Function is Ignored #429

Open g4x86 opened 5 years ago

g4x86 commented 5 years ago

Expected Behavior

The check.names argument should be able to control whether or not to check and modify the column names of input XLSX file, in the same way as the read.table function of the R system.

Actual Behavior

Regardless the value given to check.names, the column names are ALWAYS checked and modified to satisfy the rules of syntactically valid variable name.

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

  1. Prepare a XLSX file with a data table whose column names contain space characters.

  2. Use read.xlsx to read in the XLSX file with the check.names set to FALSE.

  3. The space characters in the column names of the generated table are replaced by the dot characters.

sessionInfo()