[R] exporting data to stata
lists at dewey.myzen.co.uk
Thu Mar 22 13:12:02 CET 2018
Your object called data1 is, as you showed us, of the wrong class. You
therefore need to convert it in some way although i suspect you will
then use the survey information.
On 22/03/2018 07:46, rosario scandurra wrote:
> I am new to R and I want to export data into Stata. Could somebody help with that? Thanks a lot.
> This is the code I am using:
>> data1 <- readRDS("r17045_ESDB_Habitatges_BDD_V_1_0.rds")
>> write.dta(data="data1", file = "D:/datasets/data1.dta")
> Error in write.dta(data = "data1", file = "D:/datasets/data1.dta") :
> The object "dataframe" must have class data.frame
>> class (data1)
>  "survey.design2" "survey.design"
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help