Skip to content

Feasibility of read_dta? #15

Open
Open
@buscandoaverroes

Description

@buscandoaverroes

Hello and thank you all so much for creating this package! I love using the metadata file to help track changes in labels and variable names over time.

I'm trying to use read_surveys() with .dta files, it doesn't seem to read them properly unless I first convert from .dta to .rds with haven, and then import with read_rds():

# importing .dta files doesn't form a proper survey_list object
survey_waves <- read_surveys(rounds, .f="read_dta")    # this runs
document_waves(survey_waves)   # this produces the error
## Error: is.survey(df = survey_list[[1]]) is not TRUE

# the same process with the .dta files exported as .rds files presents no problem
survey_waves_rds <- read_surveys(rounds_rds, .f="read_rds")    # this runs
document_waves(survey_waves_rds)   # no error

Since it looks like retroharmonize::read_spss() is a wrapper for haven::read_spss(), to what extent could a retroharmonize::read_dta() be created by substituting the equivalent haven function? Conceptually, what other changes to the code might you think necessary? Again, thanks so much for retroharmonize and for any help or input you could provide.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions