I got a .dta extension file by e-mail, but I can't save it in my computer and open it in R. How can I do it? [[alternative HTML version deleted]]
library('foreign') d <- read.dta('yourfile.dta') read.dta() reads in files having "Stata version 5?11 binary format into a data frame". Make sure you read the help page ?read.dta after you load the foreign package and before you try to read in the data. HTH, Dennis On Fri, Aug 5, 2011 at 6:35 PM, Gabriel Cepaluni <gabi.cepal at gmail.com> wrote:> I got a .dta extension file by e-mail, but I can't save it in my computer > and open it in R. How can I do it? > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
dta is a very generic extension, so that is not enough information. I recommend saving it and opening it with a text editor. If it is binary, you will need to ask the sender how to open it. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Gabriel Cepaluni <gabi.cepal@gmail.com> wrote: I got a .dta extension file by e-mail, but I can't save it in my computer and open it in R. How can I do it? [[alternative HTML version deleted]] _____________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]
.dta is usually a State data file. Thou would be able to read it in R with the function read.dta in the package foreign. Abhijit Sent from my HTC Aria™ smartphone on AT&T ----- Reply message ----- From: "Gabriel Cepaluni" <gabi.cepal@gmail.com> Date: Fri, Aug 5, 2011 9:35 pm Subject: [R] .dta from e-mail To: <r-help@r-project.org> I got a .dta extension file by e-mail, but I can't save it in my computer and open it in R. How can I do it? [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]