[R] read_dta & .name_repair

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Thu Oct 24 15:23:42 CEST 2019


I don't know, but the function interface for read_dta ]1] does not appear to offer the opportunity to modify the arguments to .name_repair. This looks like a bug in the package, which means you should be using the resources identified by the package maintainer [2] to report this issue.

[1] https://www.rdocumentation.org/packages/haven/versions/2.1.1/topics/read_dta

[2] https://cran.r-project.org/web/packages/haven/index.html

On October 24, 2019 4:18:15 AM PDT, Sigbert Klinke <sigbert using wiwi.hu-berlin.de> wrote:
>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)

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list