Displaying 20 results from an estimated 5000 matches similar to: "Problem exporting data using write.foreign"
2006 Jul 13
1
writeForeignSAS and potential extensions
Dear R-devel,
I've made some potential extensions to writeForeignSAS
in 'foreign' that I wanted to pass along if anyone is
interested. I've attached the diff -u output against
the version found in foreign_0.8-15 and an .R file
with my changes. (In this .R file, the function is named
writeForeignSAS7 to simplify testing/comparisons.)
I've tried to alter the current
2024 Jun 06
1
Bug report for package foreign anf functon write.foreign
Dear all,
First of all, I thank you for the creation of the package.
I write this message concerning the write.foreign() function from the foreign package and a bug that I discovered.
When we want to save our dataset as a .sas file, the limit of variable names character is 8 by default. In SAS this limit is 32 character and an argument in the function, validvarname, can theorically switch the
2010 Jul 31
3
a problem
dear:
when I read a Excel file(exp-11),The R project give me a error ,Just like this:
??'datafile'
> write.foreign("exp-11.xls")
???list(df = df, datafile = datafile, codefile = codefile) :
??'datafile'
> write.foreign("exp-11.xls")
???list(df = df, datafile = datafile, codefile = codefile) :
??'datafile'
>
2013 Mar 19
1
source, sys.source and error line numbers
Hi,
is there a way to retrieve the line number of where en error occurred when
sourcing a file in a tryCatch statement? Is it stored somewhere accessible?
It is not found in the error object.
Consider the following code/output and note the difference in the traceback
between source (has line number) and sys.source (has no line number).
Thank you,
Renaud
########
# code
########
codefile <-
2006 Jan 11
3
SPSS and R ? do they like each other?
... and is there also such a nice tool (like spss.get) for exporting
data frames to SPSS? write.table does not keep the data frame labels -
neither did the other exporting tools that I found.
Thanks!
Michael
[[alternative HTML version deleted]]
2011 Nov 11
1
Formula variable help
I have an R script with the following applicable lines:
xshort <- window(s, start=st, end=ed)
. . .
xshort <- ts(xshort, frequency=1, start=1)
. . .
m1 <- m2 <- m3 <- m4 <- m5 <- m6 <- NULL
m1 <- tslm(xshort ~ trend)
I get an error:
Error in get(dataname) : object 'xshort' not found
When I do traceback() I get:
3: get(dataname)
2: tslm(xshort ~
2011 Sep 20
1
Data
Hey everybody,
i am using the rugarch-package and its great!
I have a pretty easy problem, but i just dont get it, so thanks if you can
help me.
Normally i use:
/
data(DATANAME)
spec = ugarchspec()
fit = ugarchfit(data = x[,1], spec = spec)
fit
slotNames(fit)
names(fit at fit)
coef(fit)
infocriteria(fit)
likelihood(fit)
nyblom(fit)
signbias(fit)
head(as.data.frame(fit))
head(sigma(fit))
2000 May 02
2
Variable names in model formula
At 10:37 PM 5/1/00 -0400, E. S. Venkatraman wrote:
>I have the following problem. I have survival data (time, status) along
>with several covariates (X1, X2,..., Xn). I want to fit a Cox model for
>each of the covariate (univariately) and obtain the fitted probability of
>survival at a fixed time point t0 and covariate value Xi0. I tried to do
>this in a for loop where the index
2006 Dec 20
1
R Version Problem in using write.foreign+SAS
Hi experts,
I have a problem in Write.foreign command (SAS).
I have a data frame called d.
>d
Datetime
2006-12-01 00:00:00
2006-12-01 00:10:00
2006-12-01 00:20:00
2006-12-01 00:30:00
2006-12-01 00:40:00
>class(d$Datetime)
[1] "POSIXt" "POSIXct"
Then I tried with,
write.foreign(d,"Z:\\try_i.sas7bdat"," Z:\\try_i.sas
2006 Dec 11
2
FW: R
Hi Ricky / AJ
Progress of sorts. I got passed the last problem by looking at the makefiles
but run in to the next one, see below.
It has created files in /contrib/R-2.4.0. there is an " R " under
/contrib/R-2.4.0/bin/R.
Running it gives :-
/contrib/R-2.4.0/bin/R
R version 2.4.0 (2006-10-03)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is
2006 Dec 20
1
FW: R Version Problem in using write.foreign+SAS
Hi R experts,
I have a problem in Write.foreign command (SAS).
I have a data frame called d.
>d
Datetime
2006-12-01 00:00:00
2006-12-01 00:10:00
2006-12-01 00:20:00
2006-12-01 00:30:00
2006-12-01 00:40:00
>class(d$Datetime)
[1] "POSIXt" "POSIXct"
Then I tried with,
write.foreign(d,"Z:\\try_i.sas7bdat"," Z:\\try_i.sas
2009 Oct 08
3
error message - unexpected input
I have been using R the past couple of years to run models on data we
are collecting. I recently got a new computer and updated to a new
version of R (2.60 -> 2.90). Since the update, I cannot get my syntax to
run. I have tried copying the file it is looking for into many different
directories to try and run it. In the last version, I found that it was
easiest if the file was copied into the R
2010 Jul 27
6
Eval() or parse() do not work inside function
I am writing a function where the arguments are names of objects or variable
names in a data frame. To convert the strings to the objects I am using
eval(parse(text=name)):
f.graph.two.vbs<-function(dataname,v1){
val<-paste(dataname,v1,sep="$")
val<-eval(parse(text=val))
val
}
However running this returns an error:
2007 Apr 23
0
foreign::read.ssd and long names (PR#9631)
Full_Name: Jeff Hallman
Version: 2.4.1
OS: Linux
Submission from: (NULL) (132.200.32.34)
read.ssd() invokes PROC COPY to create an xport file, but PROC COPY has some
annoying limitations that read.ssd() should deal with. The first is that PROC
COPY doesn't work with member names (the sectionnames argument to read.ssd)
longer than 8 characters. The second is that PROC COPY also fails if any
2002 Nov 13
0
problems with read.ssd in foreign
I'm trying to read in a sas system file (.sas7bdat) created
under SAS 8.2 using read.ssd as follows:
> library(foreign)
> libname <- "c:/sasuser/consult/"
> sascmd <- "c:/Program\ Files/SAS\ Institute/SAS/V8/sas.exe"
> subset <- read.ssd(libname, "subset", sascmd=sascmd)
SAS failed. SAS program at c:\windows\TEMP\Rtmp6673\file24544.sas
a
2006 Jul 18
1
possibly stupid question about RPM building
I'm trying to build an RPM of R 2.3.1 on a very old RedHat system
(specifically, a ROCKS 3.3.0 cluster which is built on RH enterprise
3 (I think??))
I downloaded R-2.3.1.tgz from CRAN; downloaded the R.spec file
cran.r-project.org/http://cran.r-project.org/bin/linux/redhat/SRPMS/ ;
and ran rpmbuild -ba R.specs.
Everything goes along fine until ...
make[5]: Entering directory
2006 Nov 24
1
Fwd: Dates Conversion/write.foreign
---------- Forwarded message ----------
From: Shubha Vishwanath Karanth <shubhak at ambaresearch.com>
Date: Nov 24, 2006 7:54 PM
Subject: Dates Conversion/write.foreign
To: Shubha Karanth <shubhakaranth at gmail.com>, Shubha Vishwanath
Karanth <shubhak at ambaresearch.com>
Hi R experts,
I need an urgent help...
I have an a dataframe caled idat. Below i give a snapshot
2017 Dec 04
0
Dynamic reference, right-hand side of function
The generic rule is that R is not a macro language, so looping of names of things gets awkward. It is usually easier to use compound objects like lists and iterate over them. E.g.
datanames <- paste0("aa_", 2000:2007)
datalist <- lapply(datanames, get)
names(datalist) <- datanames
col1 <- lapply(datalist, "[[", 1)
colnum <- lapply(col1, as.numeric)
(The 2nd
2017 Dec 04
3
Dynamic reference, right-hand side of function
Hi R-users!
Being new to R, and a fairly advanced Stata-user, I guess part of my problem is that my mindset (and probably my language as well) is wrong. Anyway, I have what I guess is a rather simple problem, that I now without success spent days trying to solve.
I have a bunch of datasets imported from Stata that is labelled aa_2000 aa_2001 aa_2002, etc. Each dataset is imported as a matrix, and
2017 Dec 04
3
Dynamic reference, right-hand side of function
Hi!
Thanks for the replies!
I understand people more accustomed to R doesn't like looping much, and that thinking about loops is something I do since I worked with Stata a lot. The syntax from Peter Dalgaard was really clever, and I learned a lot from it, even though it didn't solve my problem (I guess it wasn't very well explained). My problem was basically that I have a data matrix