> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Phil Spector
> Sent: Tuesday, October 19, 2010 10:49 AM
> To: David Winsemius
> Cc: r-help@r-project.org; johannes rara
> Subject: Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?
> 
> I've verified that David's solution will work, but
>    a) since if is a reserved word, you must use the full name
>       of the argument, namely ifs
>    b) the argument passed through ifs= should be a full
>       subsetting if statement.
> 
> So adding
> 
>       ifs='if _n_ <= 10'
> 
> to your sas.get call will return only the first 10 observations.
> 
>                                       - Phil Spector
>                                        Statistical Computing Facility
>                                        Department of Statistics
>                                        UC Berkeley
>                                        spec...@stat.berkeley.edu
> 
>

 
I like the sas.get function from the Hmisc package.  But if for some reason the 
OP can't or doesn't want to use sas.get, it is fairly easy to add a parameter 
to the read.ssd function to limit the number of records read from the SAS 
dataset being exported.  If the OP or anyone else is interested, they can 
contact me off-list and I will provide an example (no need to clutter up the 
list).

Dan

Daniel Nordlund
Bothell, WA USA
 

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to