Displaying 20 results from an estimated 20000 matches similar to: "Read SAS .sd2 file into R?"
2007 Sep 27
1
Reading SAS SD2 Data file
I am trying to read a SAS dataset into R that is in a .SD2 format, which
is the Version 6 standard format from SAS.
I see the routines that read the SAS XPORT format (foreign, Hmisc), but
is there any way to read this one?
Any help would be greatly appreciated.
Corey Sparks
Corey Sparks
Assistant Professor
Department of Demography and Organization Studies
University of Texas-San Antonio
One UTSA
2002 Apr 26
4
SAS and R
Hello
I am sure this is elementary, but I can't figure it out.....
I am using SAS v8.2 and R 1.4.1 on a Windows platform.
I have a large (6 megabyte) file in .sd2 format. I want to import it into R.
If necessary, I can create a smaller file, as I don't need all the variables that are in this file
I downloaded the package foreign. I then tried to use PROC CPORT in SAS to create a
2000 Jul 05
1
function SAS dataset to R matrix (dataframe)
Is there such a function (like sas.get for S ...)
to be able to convert a SAS dataset (PC one .sd2)
to a dataframe or matrix in R?
thanks
--
Didier G. Leibovici didier at fmrib.ox.ac.uk +44 (0)1865 222 739
Image Analysis Group fax:+44 (0)1865 222 717
Oxford University, Centre For Functional Magnetic Resonance Imaging of
the Brain (FMRIB), John Radcliffe Hospital,
2010 Oct 19
1
How to read only ten rows from a SAS dataset (read.ssd)?
I'm trying to read SAS datasets on Windows:
sashome <- "C:/Program Files/SAS/SAS 9.1"
fold <- "C:/temp"
g <- read.ssd(fold, "sasfile", sascmd = file.path(sashome, "sas.exe"))
How to get only e.g first ten rows into R?
-J
2007 Oct 09
2
read sas data into R
Hi
I am having trouble using read.ssd. Can someone help?
The code that I have written is
*sashome<-"C:/Mary/Datasets"*
*read.ssd(read.ssd(file.path(sashome, "core", "sashelp"), "surv_1v",*
*sascmd = file.path(sashome, "sas.exe"))*
Here the path that I have given is correct, where the dataset
surv_1v.sas7bdat is kept. The message that R gives
2008 Dec 03
2
reading version 9 SAS datasets in R
Hi,
I am trying to read a SAS version 9.1.3 SAS dataset into R (to preserve
the SAS labels), but am unable to do so (I have read in a CSV version).
I first created a transport file using the SAS code:
libname ces2 'D:\CES Analysis\Data';
filename transp 'D:\CES Analysis\Data\fadata.xpt';
/* create a transport file - R cannot read file created by proc cport */
proc
2008 May 15
1
Reading SAS data into R
Hi R,
Suppose that SAS dataset 'tsubset1' is stored in the path, "Z:/data".
Then I give the below read.ssd() command to read SAS dataset,
'tsubset1.sas7bat' into R.
> library(foreign)
> s=read.ssd("Z:/data","tsubset1",sascmd = "C:/Program Files/SAS/SAS
9.1/sas.exe")
> s
A B C
1 3 4 5
2 6 7 8
3 3 4 5
It reads
2009 Jun 08
1
Interpreting R -results for Bivariate Normal
HI Guys,
I know that this forum is not for homework but I am trying to interpret R
output code.
I was just wondering if someone might be able to help.
I have been given the following.
For (X1,X2) distributed bivariate normal with parameters
mu1 = 5.8
mu2 = 5.3
sd1 = sd2 = 0.2
and p = 0.6
The r-code and inpit/output are as follows
input
m <- 5.3 + 0.6*(6.3 - 5.8)
s <-
2005 Oct 25
1
file size limit for importing SAS file
Does anyone know if there is a file size limit for inputting a SAS data
set? The file size I am trying to import is 184 MB.
The code is:
>library("foreign")
>
> sashome<-"C:/Program Files/SAS Institute/SAS/V8"
> input.data<-read.ssd( file.path("G:/DATA/Cam/ECPATH/FIM"),"tbm_c",
+ sascmd=file.path(sashome,"sas.exe")
2008 Oct 13
2
SAS Data
Hello everybody,
I would like to read a SAS Data data1.sas7bdat in R! Is this possible?
Thank you a lot in advance ;),
Stefo
2009 Feb 13
1
equivalent to SAS genmod code in R?
Hello,
I have to run a general linear mixed model which looks at 2 dependent
variables at the same time (var1 divided by var2). I have tryed to search
for such a kind of model structure but since I just started using R my
search was not successful. Especielly since I only have an old SAS GENMOD
code structure from my project supervisor as an indication.
My question is no, does there exist a code
2009 Jun 22
4
SAS-like method of recoding variables?
Dear R-helpers,
I am helping a SAS user run some analyses in R that she cannot do in
SAS and she is complaining about R's peculiar (to her!) way of
recoding variables. In particular, she is wondering if there is an R
package that allows this kind of SAS recoding:
IF TYPE='TRUCK' and count=12 THEN VEHICLES=TRUCK+((CAR+BIKE)/2.2);
Thanks for any help or suggestions you might be able
2011 Nov 29
1
Create an identifier variable
I am needing to create a new identifier variable for a data set which has no
ID variable in the original file. I am basically wanting to take the count
of each row and add "sd" in front of it - so it would look like so
sd1
sd2
sd3
sd4
sd5 etc.......
I have no idea how to do this. I am a SAS user trying to learn R. This
question may have been answered previously, but I could be
2006 Aug 30
1
Datetime
Hi all,
I'm getting confused by date handling.
I wish to read a date from a file wich is a number of seconds since 1970
(POSIXct).
Then i wish to convert this date to a human readable form (POSIXlt)
By example :
ctDate<-1132963200 #"Wed Aug 30 14:24:37 2006"
is(ctDate)
[1] "numeric" "vector"
ctDate isn't a numeric vector, it is a
2006 Feb 20
2
glob2rx function not working
Dear R users,
Inspired by previous list discussion of the glob2rxc function, I am
attempting to create a new vector called TOTAL by summing all vectors
whose names begin with ABC:
TOTAL = sum(list = ls(pattern = glob2rx("ABC*")))
I'm running R 2.2.1 on Windows XP. Can anyone say what I'm missing?
Thank you, Mark
2007 Mar 18
3
Read a .sas7bdat file
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070318/73867327/attachment.pl
2008 Feb 15
1
Questions about EM algorithm
Dear all:
Assume I have 3 distributions, x1, x2, and x3.
x1 ~ normal(mu1, sd1)
x2 ~ normal(mu2, sd2)
x3 ~ normal(mu3, sd3)
y1 = x1 + x2
y2 = x1 + x3
Now that the data I can observed is only y1 and y2. It is
easy to estimate (mu1+m2), (mu1+mu3), (sd1^2+sd2^2) and
(sd1^2+sd3^2) by EM algorithm since
y1 ~ normal(mu1+mu2, sqrt(sd1^2+sd2^2)) and
y2 ~ normal(mu1+mu3, sqrt(sd1^2+sd3^2))
However, I want
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
Windows 7, R 2.12.1
Colleagues,
I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will note the value (preceded by stars) is printed as 1.
The function (1) prints a lot of output without any
2007 Jan 30
2
R and S-Plus got the different results of principal component analysis from SAS, why?
Dear Rusers,
I have met a difficult problem on explaining the differences of principal
component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't
met before.
Althought they have got the same eigenvalues, their coeffiecients were
different.
First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show
the original dataset, hoping sb. to try and explain it.
2001 Nov 27
2
R/S and large datasets - Database access (also Re: SAS and S/R)
A consensus seems to emerge : R would excel to exploratory work on
small/middle-sized datasets, while SAS would be able to munch much
larger datasets.
However, I see the "size" problem as a red herring. The objects that
have to stay "in core" are usually much smaller than the dataset. For
example, for problems involving fixed-effects linear models, you need
only some