Import dta into R: get rid of Stata formatting
I used read_dta to import Stata files into R. I am trying to get rid of attr(,"format.stata") which seems to have been stored into a list. I tried different things based on my google search but none of them have worked. > df2$peer_id_spec[[1]] [1] 41 attr(,"format.stata") [1] "%9.0g" > df2$peer_id_spec <- zap_labels(zap_formats(df2$peer_id_spec)) > df2$peer_id_spec[[1]] [1] 41 attr(,"format.stata") [1] "%9.0g" > df2$peer_id_spec[[1]] [1] 41 attr(,"format.stata") [1] "%9.0g" > df2$peer_id_spec <- zap_formats(df2$peer_id_spec) > df2$peer_id_spec[[1]] [1] 41 attr(,"format.stata") [1] "%9.0g" > df
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.