[R] Opening SAS file using read.sas7bdat() function in sas7bdat library.

Marc Schwartz marc_schwartz at me.com
Mon Oct 29 20:13:37 CET 2012


On Oct 29, 2012, at 2:04 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

> On 29/10/2012 2:54 PM, Marc Schwartz wrote:
>> On Oct 29, 2012, at 1:28 PM, Praveen Surendran <praveen.surendran at ucd.ie> wrote:
>> 
>> > 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.
>> 
>> 
>> More than likely, a similar problem as in this recent thread, but for 64 bit, rather than 32 bit:
>> 
>>   https://stat.ethz.ch/pipermail/r-help/2012-October/325257.html
> 
> If you look at the source for the function, it checks the "SAS_host" against a known list, containing
> 
> # 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")
> 
> Praveen's host is not in that list, so the package author has never tested it.   But nothing else in the code appears to depend on the host, so it's a good guess that adding another host string to that list (or changing the error to a warning) will make it work properly.
> 
> Duncan Murdoch


As per that prior thread, Matt has added those to the source on GitHub:

  https://github.com/BioStatMatt/sas7bdat/blob/master/R/sas7bdat.R

at line 86:

# 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",
               "W32_ESRV", "W32_7PRO", "W32_VSHO", "X64_7HOM",
               "X64_7PRO", "X64_SRV0")


It's presumably just a matter of Matt releasing an updated version of the package. There were some comments in that prior thread of communication issues with Matt, so not sure what is going on there relative to time frame.

Regards,

Marc




More information about the R-help mailing list