Displaying 20 results from an estimated 10000 matches similar to: "How to import SAS data in R?"
2003 Oct 29
2
importing SAS data
I am trying to import a permanent SAS data
set using read.ssd in the foreign library. I get
the following error:
> list.files("C:/temp")
[1] "newdat1.sas7bdat" "snpm1.sas7bdat" "test1.sas"
> library(foreign)
> newdat1 <- read.ssd("C:/temp","newdat1")
SAS failed. SAS program at
2005 Aug 12
1
Concerning reading of SAS-files
Hi!
I'm trying to start a credibility estimation study with a coule of data
sets that are created for SAS. The data sets are saved as ".sas7bndx" and
".sas7bdat".
I've tried reading them to R with the function 'read.xport' but this
returns the error message 'Error in lookup.xport(file) : unable to open
file'.
Are there any other functions that one
2012 Mar 28
2
SAS Import with sas.get {Hmisc} - status 127 error
I'm trying to import a .sas7bdat dataset into R with sas.get. I'm using
Win-7 and SAS 9.2. I have read the following post and did tweak the line
(127, incidentally) of code.
<http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc-td81
4367.html>
http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc-td814
367.html
However, I get the following
2007 Apr 10
3
sas.get problem
I have 3 SAS files all in the directory F:/sas, two
data files
and a format file :
form.ea1.sas7bdat
form.ea2.sas7bdat
sas.fmts.sas7bdat
F is a USB.
I am trying import them to R using "sas.get".
I have not used SAS since I was downloading data from
mainframe
and having to write JCL. I had forgotten how bizarre
SAS can be.
I currently have not even figured out how to load the
files
2010 Dec 28
2
Importing Sas files to R
Dear All,
Am trying to import SAS files to R.
For that i used library "Hmisc" and
try<-sas.get("C:\\ex.sas7bdat") . But it shows error that
Error in sas.get("C:\\ex.sas7bdat") : SAS member name is required
In addition: Warning message:
In sas.get("C:\\ex.sas7bdat") :
C:\ex.sas7bdat/formats.sc? or formats.sas7bcat not found. Formatting
ignored.
2005 Nov 14
2
Using pakage foreign and to import SAS file
Hi,
I'm struggling with foreign to import a SAS file. The file, for lack of imagination, is d.sas7bdat and is in my root directory (c:\) under Windows XP. When I type
read.ssd("c:\\", "d")
which I think I'm suppose to enter, I get
SAS failed. SAS program at C:\DOCUME~1\Owner\LOCALS~1\Temp\Rtmp32758\file19621.sas
The log file will be file19621.log in the current
Importing a SAS file to R: Alas, STILL more problems--has anyone gotten this message before, and why
2004 Feb 09
1
Importing a SAS file to R: Alas, STILL more problems--has anyone gotten this message before, and why
Sorry to write twice in one day--I am a relative newbie to some of these
parts of R, and I am pulling my hair out! B/c I am preparing a file to
use WINBUGS I am cross-posting to the BUGS group as well, in case anyone
there has some ideas on this.
I've got a large SAS dataset that I want to put in R form to more easily
use the file with the hierarchical modeling software WINBUGS. It has
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
2012 Oct 29
3
Opening SAS file using read.sas7bdat() function in sas7bdat library.
Hi,
I have a file in .sas7bdat format. I tried to open this file using
read.sas7bdat() function.
This gave me an error - "Error in read.sas7bdat("bnp_genetic.sas7bdat") :
unknown host X64_7PRO".
Could someone tell me what this error means?
Thank you,
Praveen.
[[alternative HTML version deleted]]
2010 Aug 02
1
read SAS dataset using read.ssd()
Hi, I am using read.ssd() from foreign package to read some SAS datasets. I have
2 types of SAS datasets, one with "sas7bdat" extension, the other with "ssd01"
extension. I have no problem with the first dataset type, but got the following
error message with the 2nd dataset type (with "ssd01" extension):
test<-read.ssd("C:/Documents and
2010 Mar 25
1
Read SAS data
Hi!
I need to import in R some SAS dataset (sas7bdat). I found two functions to
do it:
"read.ssd" from the package "foreign" and "sas.get" from "Hmisc".
df = read.ssd(libname = path2data, sectionnames = "sasSmallDataset",
tmpXport = path2data, tmpProgLoc = path2data, sascmd = path2sas)
sas.get(libraryName = path2data, member =
2017 Aug 10
2
Import selected columns from sas7bdat file
Hello everyone,
I want to import data from huge sas files with 100s of columns. The good
thing is that I am only interested in a few selected columns. Is there any
way to do that without loading the full dataset.
I have tried two functions: (1) read.sas7bdat *[from library 'sas7bdat']*,
and (2) read_sas *[from library 'haven']. *But couldn't find what I am
looking for.
Best
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
2017 Aug 10
0
Import selected columns from sas7bdat file
I had a look at this a while back and it didn't seem to be easy. The path of least resistance would seem to be to use SAS itself to create a data set with fewer columns, but of course that requires you to get access to SAS.
Otherwise, I think you'd have to modify sas7bdat::read.sas7bdat to drop unselected columns. That function is pure R code, so it might not be quite as hard as it
2008 Apr 03
2
sqldf file specification, non-ASCII
Dear R-Listers,
I am a Windows user (R 2.6.2) using the development version of sqldf to
try to read a 3GB file originally stored in .sas7bdat-format. I convert
it to comma-delimited ASCII format with StatTransfer before trying to
import just the rows I need into R. The problem is that I get this
error:
> f <- file("hugedata.csv")
> DF <- sqldf("select * from f where
2011 Feb 17
2
convert the sas file into csv in R
i am trying to convert sas file into csv. I used write.csv(a,
file="cool.csv") but nothing come out. i don't know why. Thanks.
library(Hmisc)
a<- sasxport.get("C:\\Users\.....")
write.csv(a, file="cool.csv")
--
View this message in context: http://r.789695.n4.nabble.com/convert-the-sas-file-into-csv-in-R-tp3311769p3311769.html
Sent from the R help mailing
2017 Aug 10
1
Import selected columns from sas7bdat file
hi, the sas universal viewer might be a free, non-R way to convert a
sas7bdat file to non-proprietary formats, not sure if it's windows-only.
those other formats should be easier to import only a subset of columns
into R..
https://support.sas.com/downloads/browse.htm?fil=&cat=74
On Thu, Aug 10, 2017 at 7:42 AM, peter dalgaard <pdalgd at gmail.com> wrote:
> I had a look at this
2013 Jan 02
3
suggestions about import SAS results to R.
Hello all,
I have got some data in SAS, and I export it to one excel workbook with multiple sheets, for example, each sheet has the sales information for each state. Then I need to use R to do plotting, analysis on those sales data, where I need to load the data from excel to R.
When I read the article at this link:
http://yihui.name/en/2009/09/how-to-import-ms-excel-data-into-r/
I am
2011 Jan 05
1
Reading large SAS dataset in R
Hi all,
I have a large (approx. 1 GB) SAS dataset (test.sas7bdat) located in the
server (“R:/” directory). I have SAS 9.1 installed in my PC and I can read
the SAS dataset in SAS, under a windows environment, after assigning libname
in "R:\" directory.
Now I am trying to read the SAS dataset in R (R 2.12.0) using the read.ssd
function of the “foreign” package, but I get an error
2009 Apr 21
1
sas.get() exit
Hello,
I am trying to import SAS files into R using sas.get() in Hmisc. I am
running both SAS and R on a UNIX server. I've pasted my command and
ensuing errors below:
sas.get(lib="EOG", mem="eog3pub00_1")
Error in if (status != 0) { : argument is of length zero
In addition: Warning message:
In sas.get(lib = "EOG", mem = "eog3pub00_1") :