Can Julia Import SAS Datasets or SAS Transport Files ?

208 views
Skip to first unread message

jorttx

unread,
Mar 27, 2015, 4:57:20 PM3/27/15
to julia...@googlegroups.com
Is anyone working on the ability for Julia to import SAS datasets (*.sas7bdat files) as has been done for R ?  Julia looks great, but most of the data I need to work with originates in SAS.

Jacob Quinn

unread,
Mar 27, 2015, 5:18:42 PM3/27/15
to julia...@googlegroups.com
I used [this](http://support.sas.com/downloads/package.htm?pid=667) last fall when I needed to convert some SAS files. It's Windows only, but got the job done.

cdm

unread,
Mar 27, 2015, 5:43:29 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
if your SAS suite includes SAS/ACCESS



then there would appear to be several paths
including, but not limited to ODBC, XLSX ...

good luck.

Sam L

unread,
Mar 27, 2015, 5:46:11 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
I actually started writing a package to do this as a way to learn Julia. https://github.com/lendle/XPT.jl. It was the first thing I did in Julia, so the code is probably not great. I never fully tested it, and I haven't touched it in a year so who knows if it will work with current versions of packages. I abandoned it because I saw that someone else was working on a much more complete package which wrapped a library that they had written to handle SAS data sets and other systems as well. Of course I don't remember what that was called, and can't find that anywhere...

cdm

unread,
Mar 27, 2015, 5:48:57 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com

the Rcall package may also be of interest
if you want some R feature in Julia:



not sure how far along this is ...

cdm

unread,
Mar 27, 2015, 5:56:19 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
similarly, PyCall could allow you to reach out
to an existing Python feature ...

more here:



enjoy !!!

cdm

unread,
Mar 27, 2015, 5:58:17 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
to make the link to that Python module very clear:

Sam L

unread,
Mar 27, 2015, 6:00:27 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
Here's the package I'd found previously: https://github.com/WizardMac/DataRead.jl

It looks like it will not automatically install binary dependencies for you, but might do what you need.

cdm

unread,
Mar 27, 2015, 6:11:03 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
and this may be useful to anyone working on such a package in Julia:

Simon Byrne

unread,
Mar 27, 2015, 6:22:11 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
I had the same idea, but didn't get anywhere near as far. But I did write some code for converting the IBM float format:

Sam L

unread,
Mar 27, 2015, 6:25:58 PM3/27/15
to julia...@googlegroups.com, quinn....@gmail.com
Yes, I used that, in fact!  https://github.com/lendle/XPT.jl/blob/b39a3ae7689727ccb2c89c78d8d28515843afa28/src/IBM2Float64.jl#L1

Though I probably shouldn't have, because your gist is unlicensed...
Reply all
Reply to author
Forward
0 new messages