Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import Stata file into R #89

Open
mujahedulislam opened this issue Feb 8, 2016 · 1 comment
Open

How to import Stata file into R #89

mujahedulislam opened this issue Feb 8, 2016 · 1 comment

Comments

@mujahedulislam
Copy link

Dear Friends,

The following command will help you to import Excel file into R. I really spent good time so I do not want to repeat it for you!.:-)

install.packages("foreign") ## Installed this package to import Stata ##
library (foreign) ## this is for storing the package
dsak <- read.dta ("C:/Users/User/Desktop/test.dta") ## here dsak is just a random name. <- is assignment and then put the name of data file and show the directory.

Hope it would help!
Sincerely,
Mujahed

@christophergandrud
Copy link
Contributor

Another solution is is to use the import function from the rio package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants