Skip to content

Failure of sas7bdat package

2 messages · Barry Rowlingson, Nordlund, Dan (DSHS/RDA)

#
On Thu, Oct 4, 2012 at 4:55 PM, Fisher Dennis <fisher at plessthan.com> wrote:
Just having a look at the source code for Matt's sas7bdat package,
there's a special bug report email:
[1] "please report bugs to sas7bdatRbugs at gmail.com"

Further, if you read the vignette("sas7bdat") you'll see a lot of
technical stuff that has been reverse engineered about the sas format.
The source code contains this chunk:

# Host systems known to work
KNOWNHOST <- c("WIN_PRO", "WIN_NT", "WIN_NTSV", "WIN_SRV",
               "WIN_ASRV", "XP_PRO", "XP_HOME", "NET_ASRV",
               "NET_DSRV", "NET_SRV", "WIN_98", "W32_VSPR",
               "WIN", "WIN_95", "X64_VSPR", "X64_ESRV")

and it seems your data doesn't have a known host code. I suspect Matt
has never seen a SAS file from a Windows 7 Pro box.

Now, the code currently doesn't do anything dependent on the host,
there's just a cautionary stop() that you have hit. You could edit
read.sas7bdat, remove the stop (or add W32_7PRO to the known hosts),
reinstall, and see if it works.

 Or more hackerly, edit the file and replace W32_7PRO with a valid
KNOWNHOST of exactly the same length (so as not to upset the delicate
binary balance). "W32_VSPR" would work. Be careful editing binary
files with a text editor - it might try to wrap lines or mung your
file in nasty ways.

 Barry
#
Dennis,

Looking at the source code on github, Matt has already added W32_7PRO to the list of known hosts.  So, you could download the source tarball and build the package yourself, or just extract the SAS7bdat.R file from the tarball and source it into your R session.  Otherwise, you will probably need to wait for the next update to be submitted to CRAN.

Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204