Closed
Description
openedon Jan 15, 2019
Dear developer,
It seems that a read_sas()
fails whenever a SAS dataset has no variables. This happens with haven 1.1.2 and higher. Probably it would be better to inform user that dataset does not have variables rather than failing. For example, If you have a dataset created with the following code:
libname out '~';
data out.some_data;
run;
and then you read with haven::read_sas('~/some_data.sas7bdat')
it gives the following error:
ReadStat: Error parsing page 0, bytes 74752-149503
Error in df_parse_sas_file(spec_data, spec_cat, encoding = encoding, catalog_encoding = catalog_encoding, :
Failed to parse /opt/bee/home_NEW/manukyae/some_data.sas7bdat: Unable to allocate memory.
> R.version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 5.1
year 2018
month 07
day 02
svn rev 74947
language R
version.string R version 3.5.1 (2018-07-02)
nickname Feather Spray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment