0

I am looking for a package which can read .sas7bvew in R. I was trying with haven, but it can only read .sas7bdat

I tried the following: (assume lib2 contains the data.sas7bvew file, and I am trying to save it at lib1)

data lib1.mydata;
set lib2.data;
run;

After the above step I can see data.sas7bdat is being created at lib1. And I can easily read the .sas7bdat file with R. Is there any way I can read the .sas7bvew file directly in R.

Lotto7408
  • 13
  • 2
  • Do you mean sas7bdat? If so, then library(sas7bdat); – pinegulf Jul 11 '18 at 11:46
  • Please read the description. – Lotto7408 Jul 11 '18 at 11:52
  • Sure, sure. It just does not compute with me. Quote=" The SAS Data View looks and acts just like a SAS Dataset. However the Data View contains no data whatsoever. Instead the Data view contains code." So what are you exactly trying to do? Exporting SAS code to R? See more on http://www2.sas.com/proceedings/sugi27/p069-27.pdf – pinegulf Jul 11 '18 at 12:21
  • Sas7BVew is really a file with a query underneath, not a data table with information. Do you want the code/query instead? – Reeza Jul 11 '18 at 14:46
  • @pinegulf I wanted to read the a .sas7bvew file in R. One "trivial" option is to first use a data step in SAS to save the file as .sas7bdat and then read it in R via haven. But I wanted to know if we can do that directly without opening SAS. – Lotto7408 Jul 17 '18 at 13:14

1 Answers1

3

No.

There is no data in a view for R or any other non-SAS program to read.

Tom
  • 47,574
  • 2
  • 16
  • 29