-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
I had a process in place to send R data to SAS by way of an SPSS dataset, using the "inefficient uncompressed format."
With Haven 2.4.0 and above, the data read into SAS is now garbled.
Why wasn't there an option for doing the byte compressed format? Or at least keeping the uncompressed format?
SAS Proc Import cannot read this new format.
This is not something the authors of "The Pragmatic Programmer" would approve of -- blindly making changes to code and having something downstream you are not aware of break.
sample R script:
library(dplyr)
library(haven)
data("iris")
set.seed(34567)
sampl_iris <- iris %>%
group_by(Species) %>%
slice_sample(n = 5)
xdir <- "."
write_sav(sampl_iris,file.path(xdir, "irisdata.sav"))
Sample SAS code:
filename sav_file "./irisdata.sav";
proc import out = irisdata
datafile = sav_file
dbms = SAV replace;
run;
proc print data=irisdata;
title1 "sample iris data";
run;
Metadata
Metadata
Assignees
Labels
No labels