Closed
Description
When trying to read an ODS file with no header line containing column names, I get the following message :
formal argument "col_names" matched by multiple actual arguments
Example:
library(readODS)
write_ods(mtcars,"mtcars.ods")
adding: content.xml (deflated 96%)
adding: META-INF/ (stored 0%)
adding: META-INF/manifest.xml (deflated 61%)
adding: meta.xml (deflated 51%)
adding: mimetype (deflated 4%)
adding: styles.xml (deflated 70%)
import("mtcars.ods",col_names=FALSE)
Error in readODS::read_ods(path = file, sheet = which, col_names = header, :
formal argument "col_names" matched by multiple actual arguments
read_ods("mtcars.ods",col_names=FALSE)
Parsed with column specification:
....
Activity
chainsawriot commentedon Jun 19, 2019
There is an undocumented
header
argument forrio::.import.rio_ods
, it will convert automatically intocol_names
. So, at the moment, you can try:import('mtcars.ods', header = FALSE)
Unfortunately, this argument is not documented. Probably because in the early days of rio, there was a need to unify all
header
/col_names
arguments intoheader
. It makes sense to remove that now.@leeper
chainsawriot commentedon Jun 19, 2019
related to #132 .
jllipatz commentedon Jun 21, 2019
Is there a chance that the 'header' argument will disappear in some future? If so, the solution is not better than using read_ods instead of import!
bokov commentedon Sep 23, 2019
#225 might fix this by mapping it same way that the
which
argument is mapped.leeper commentedon Oct 3, 2019
@bokov I think this is now fixed, right?
bokov commentedon Oct 4, 2019
Yes! This is fixed (in addition, confirming that the
write_ods()
used in the original reprex gives the same outcome asexport()
).leeper commentedon Oct 5, 2019
Super!
...
and remapping behaviors for v1.0.0 #326