Closed tomstockfisch closed 5 years ago
a column with literal "+" and "-" signs expected to be read by read.xlsx() into a data.frame that shows these as text
data.frame output has "+" ok, but "-" is converted to NA
(please attach an example xlsx file if possible)
1.Type in a column in excel with some cells set to + and others to -
2.save as xlsx
3.read using read.xlsx() write out as csv note that - cells are now empty (+ cells are ok)
Changing Format>cell>Number>[anything] from within excel doesn't help at all.
Sorry, I accidentally subsequently read the data frame back in from a file with read.csv( ..., na.string=c("NA","","-","N/A","#N/A"). read.xlsx() is working fine in this case by itself.
Expected Behavior
a column with literal "+" and "-" signs expected to be read by read.xlsx() into a data.frame that shows these as text
Actual Behavior
data.frame output has "+" ok, but "-" is converted to NA
Steps to Reproduce the Problem
(please attach an example xlsx file if possible)
1.Type in a column in excel with some cells set to + and others to -
2.save as xlsx
3.read using read.xlsx() write out as csv note that - cells are now empty (+ cells are ok)
Changing Format>cell>Number>[anything] from within excel doesn't help at all.
sessionInfo()