Tag: Programming

sas7bdat database reader update

An earlier post (1216) introduced a compatibility study (i.e. reverse engineering) of the sas7bdat database file format. The code and documentation for this are here: http://github.com/biostatmatt/sas7bdat. I’ve recently restructured the code as an R package, and added some functionality. Look for the sas7bdat package on the CRAN. Also, the read.sas7bdat code has been ported to […]

Progress reading SAS sas7bdat files (natively) in R

This post describes some preliminary results from a compatibility study of the SAS sas7bdat file format. The most current results stored in a github repository here: sas7bdat The ultimate goal is a native solution to the incompatibility between open-source statistical software (e.g. R) and sas7bdat database files. Demonstration There has been significant progress in interpreting […]

Sometimes It’s the Journey, Not the Destination

Recently, I read Dr. AnnMaria De Mars’ blog post "Translating Ruby to SAS (or vice versa)." I found that I really liked it, and not just because she mentions me (although that was pretty cool). But rather, I like the end of the post, whe…

Jedi SAS Tricks: Email from the Front – Part 2

In my last blog post, I discussed how to use SAS options to send unattended email using an SMTP server. In this segment, I’ll tackle creating “pretty” email (using HTML) and sending out emails with attachments. First, I produced a basic repo…

Weekday Morning Quick-trick: How to Score from PROC VARCLUS

Have you used multivariate procedures in SAS and wanted to save out scores? Some procedures, such as FACTOR, CANDISC, CANCORR, PRINCOMP, and others have an OUT= option to save scores to the input data set. However, to score a new data set, or to p…

To INDEX or not to INDEX…

Recently, a certification candidate asked me about indexes and how SAS decides whether to use one or not.  I don’t work with supper-large data sets and therefore haven’t been overly concerned with efficient coding techniques and consequen…

Why Can’t SAS Read My CSV file?

Many SAS users receive data in the form of CSV (Comma Separated Value) files, and need to convert them to SAS data sets. A typical record in a CSV file might look like this:Jeter,Derek,1995,,234,”22,600,000”

Note the following about the reco…

SAS multiple character and varying length Delimiters

I’ve solved a problem I had in my previous post “Strip Characters From Between Two Delimiters”.  At work I was given a strangely formatted data file – example.
I needed to separate out the data chunks to work with it.  While my first solution…