AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
How to read stata 12 in r4/1/2024 ![]() The above output shows that the variables are already set to the correct types. attr(*, "names")= chr "Not stated" "Refused" "Don`t know" "None/No party". attr(*, "labels")= Named num NA NA NA 0 1 2 3 4 5 6. attr(*, "label")= chr "Best party on most important issue" ![]() attr(*, "label")= chr "A1: Most important issue" $ a01 : atomic nhs brexit society immigration. attr(*, "label")= chr "Respondent Serial Number" attr(*, "label")= chr "Final Serial Number" This gives the following output: Classes ‘tbl_df’, ‘tbl’ and 'ame': 2194 obs. To check the properties of the data set we type str(df) The data set is now stored as a dataframe df with 357 variables. Read the Stata DTA file into R with two these two lines: library(haven)ĭf & amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp amp lt - read_dta("") The file contains 2017 face-to-face post-election survey responses along with explanatory notes.
0 Comments
Read More
Leave a Reply. |