similar to: Write.dta and export of variable labels

Displaying 20 results from an estimated 10000 matches similar to: "Write.dta and export of variable labels"

2003 Nov 04
2
write.dta and handling labels
Hello, I need to write out a data matrix as a STATA 7 file and this happens perfectly with write.dta(), except I cannot seem to export the labelnames to Stata. So far I have tried the following: # X is the data matrix that is to be exported attributes(X)$var.labels <- c("apple", "banana", "cat") write(X, filename = "text.dta", version = 7) When i
2013 Jan 16
1
Read.dta and Write.dta Binary Data Error
Thanks in advance. I pass data sets between R and Stata and think dta files would be the best files for this. To do this I can use package foreign or package memisc. I mostly use foreign, although have used memisc and this problem mostly didn't happen, but created errors at other times. I have a csv data set (and created a test case) with with at least one column completely missing. This
2007 Jun 15
1
importing .dta files
I'm trying to read in a Stata file but I've never used this function ( read.dta). It's the only one that seems to come close to working, but I keep getting this error: > data<-read.dta("C:/Documents and Settings/Chris/Desktop/S4412/catestscores.dta") Error in read.dta("C:/Documents and Settings/Chris/Desktop/S4412/catestscores.dta", : a binary read
2008 Mar 18
2
read.dta for files from stata 9.0
Dear R-helpers, if I want to read a .dta-file generated by stata 9.0 with read.dta (foreign), I get the message "not a stata version 5-8 .dta-file". I'm using R-2.6.2 and the latest version of the foreign package. Has someone any hint? With many thanks, Albrecht
2005 Jun 06
3
write.dta limits
Hope everyone id doing great .. Just need some clarification over the limit of write.dta. I have some coauthors that use stata and I need to send them my data in .dta format. the data.frame is 41706x229 and I get the following Error in write.dta(Panel, file = "STATADATA/Panel.dta", version = 7) : a binary write error occured Once I subset the data everything works out fine. my
2012 Mar 05
1
problems reading a large dta dataset in R
Dear R listers, I have a silly problem. I am trying to load a dta (Stata) file in R. The dta is about 650 MB and contains the integrated World Values Survey/ European Value Study data-set. My problem is that I don't manage to load the file. After almost 3 hours after I issued the following command: data <-
2011 Mar 01
2
How to Save R library data into xls or dta format
Thanks in advance. I'm having a trouble with data saving. I want to run the same data which is in Ecdat library at different statistic programs(excel, stata and matlab) The data I want to use is library(Ecdat) data(Housing) and I want to extract this data our of R as *.dta *.xls formats. So, my first try was to open the data in R window and drag and paste to excel or notepad. BUT, it
2004 Sep 21
2
Ever see a stata import problem like this?
Greetings Everybody: I generated a 1.2MB dta file based on the general social survey with Stata8 for linux. The file can be re-opened with Stata, but when I bring it into R, it says all the values are missing for most of the variables. This dataset is called "morgen.dta" and I dropped a copy online in case you are interested http://www.ku.edu/~pauljohn/R/morgen.dta looks like this
2008 Jan 10
1
write.dta (foreign package)
Hi, I'd like to request that the 'write.dta' command also save the "var.labels" attributes of the data frame. 'read.dta' can read them, but 'write.dta' doesn't write them back. Thanks.... Edward McNeil -- Epidemiology Unit Faculty of Medicine Prince of Songkla University Hat Yai THAILAND (\_ _/) (='.'=) ('')_('') -- This
2018 Mar 22
1
exporting data to stata
On Thu, Mar 22, 2018 at 4:52 AM, Raja, Dr. Edwin Amalraj <amalraj.raja at abdn.ac.uk> wrote: > Hi , > > library(foreign) > write.dta(data1, "data1.dta") > > should work. I don't think so: > library(foreign) > example(svydesign) > write.dta(dstrat, "~/Downloads/foo.dta") Error in write.dta(dstrat, "~/Downloads/foo.dta") : The
2018 Mar 22
3
exporting data to stata
Hi, 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: > setwd("D:/datasets/Seg-bcn/ESBD") > data1 <- readRDS("r17045_ESDB_Habitatges_BDD_V_1_0.rds") > library(foreign) > write.dta(data="data1", file = "D:/datasets/data1.dta") Error in write.dta(data =
2011 Aug 06
3
.dta from e-mail
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]]
2018 Mar 22
0
exporting data to stata
Hi , library(foreign) write.dta(data1, "data1.dta") should work. The file will be saved in the working directory. Use getwd() to know the working directory. Best wishes Amalraj Raja -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of rosario scandurra Sent: 22 March 2018 07:47 To: r-help at r-project.org Subject: [R] exporting data to stata
2009 Jan 22
2
Converting ddf/dct/sas data definition file to R
Dear all, I was wondering whether anyone knows about a program which converts (part of) a data definition file (such as a .dct file for stata, or .sas file for sas) into an R-script. Here is an example with a .sas file: <-- snipp VALUE HTYPE (default=32) 0 = "Not in household" 1 = "Married couple family household" 2 =
2012 Mar 01
1
R can't load a large dataset
Dear R listers, I have a silly problem. I am trying to load a dta (Stata) file in R. The dta is about 650 MB and contains the integrated World Values Survey/ European Value Study data-set. My problem is that I don't manage to load the file. After almost 1 hour I issued the following command: data <- read.dta("http://www.stata-press.com/data/kkd/data1.dta", convert.dates = TRUE,
2008 May 26
1
read.dta error
Greetings! I attempted to read a STATA 10 file using the following syntax: library(foreign) data <- read.dta("~/Documents/agestandard/analysis.dta") I got the following error: *** stack smashing detected ***: /usr/lib/R/bin/exec/R terminated ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7c13138]
2003 Apr 08
2
use of variable labels
The R documentation for some of the foreign package's functions says that the set of variable labels becomes attributes in the resulting data frame. Thus, e.g., 5="strongly agree", 4="agree", etc. I'm happy that the labels are being passed, but unfortunately, when R summarizes the data, it will list it only as categories, and doesn't deal with the
2011 Apr 07
1
Panel data - replicating Stata's xtpcse in R
Dear list, I am trying to replicate an econometrics study that was orginally done in Stata. (Blanton and Blanton. 2009. A Sectoral Analysis of Human Rights and FDI: Does Industry Type Matter? International Studies Quarterley 53 (2):469 - 493.) The model I try to replicate is in Stata given as xtpcse total_FDI lag_total ciri human_cap worker_rts polity_4 market income econ_growth log_trade
2012 Apr 17
1
random effects using lmer
Hi, I am trying to run a logistic regression to look at the risk of malaria infection in individuals. I want to account for intra household correlation and so want to include a household level random effect. I have been using the lmer command in lme4 package but am getting some strange results that are completely different to those I get using STATA. Can I just check that this is the correct
2008 Jan 26
1
Read stata file from internet?
Dear R-helpers, I would like to have my students read into R an online Stata dataset: 'http://www.stat.ucla.edu/projects/datasets/risk_project.dta' I was able to read it into R after downloading it and converting it with StatTransfer (http://www.stattransfer.com/). Here is what happens when I use read.dta() as I would use read.table(): > require(foreign) > risk2 <-