I had a look at this a while back and it didn't seem to be easy. The path of
least resistance would seem to be to use SAS itself to create a data set with
fewer columns, but of course that requires you to get access to SAS.
Otherwise, I think you'd have to modify sas7bdat::read.sas7bdat to drop
unselected columns. That function is pure R code, so it might not be quite as
hard as it sounds.
Incidentally, do teach your mailer to not send plain text. It is not much of a
problem this time, but HTML mails can become quite unreadable on the list.
> On 10 Aug 2017, at 12:24 , Utkarsh Singhal <utkarsh....@gmail.com> wrote:
> Hello everyone,
> I want to import data from huge sas files with 100s of columns. The good
> thing is that I am only interested in a few selected columns. Is there any
> way to do that without loading the full dataset.
> I have tried two functions: (1) read.sas7bdat *[from library 'sas7bdat']*,
> and (2) read_sas *[from library 'haven']. *But couldn't find what I am
> looking for.
> Best regards,
> Utkarsh Singhal
> [[alternative HTML version deleted]]
> Rfirstname.lastname@example.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Office: A 4.23
Email: pd....@cbs.dk Priv: pda...@gmail.com
Remail@example.com mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.