[R] read_dta & .name_repair

Sigbert Klinke @|gbert @end|ng |rom w|w|@hu-ber||n@de
Thu Oct 24 13:18:15 CEST 2019


Hi,

I can not read in a data set from Stata. When I try I get the first 
error. If I follow the advice then I get "unused argument error".

How do I use .name_repair?

Best Sigbert

----

 > library("haven")
 > packageVersion("haven")

[1] ‘2.1.1’

 > xp <- read_dta("XXX.dta")

Fehler in df_parse_dta_file(spec, encoding) :
   Evaluation error: Column name `Merge` must not be duplicated.
Use .name_repair to specify repair..

 > mynr <- function(nms) { }
 > xp <- read_dta("XXX.dta", .name_repair=mynr)

Fehler in read_dta("XXX.dta", .name_repair = mynr) :
   unbenutztes Argument (.name_repair = mynr)


-- 
https://hu.berlin/sk
https://hu.berlin/mmstat3



More information about the R-help mailing list