[R] SAS equivalent for R's signif function?

Daniel Nordlund djnordlund at frontier.com
Tue Feb 10 08:05:08 CET 2015


On 2/9/2015 7:02 PM, Allen Bingham wrote:
> Probably posting this to the wrong list ... but I'm in the process of
> learning R, after many years of using SAS --- so I thought I'd ask this
> question here:
>
>       Is there with a function (or macro) in SAS that performs the same
> action as R's "signif" function, if so please provide?
>
> Tried to find via a Google search to no success. Doesn't seem to be in the
> "R for SAS and SPSS Users" by Robert A. Munchen (first edition is what I
> have), or in SAS and R by Ken Kleinman and Nicholas J. Horton (2nd edition)
> [although in the latter they do list the R "signif" function on page 61 ...
> but don't list a SAS equivalent.
>
> If you have a suggestion for a different list that I might ask this question
> (assuming I don't get the answer here), provide that as well.
>
> Thanks-Allen
>
> ______________________________________
> Allen Bingham
> Bingham Statistical Consulting
> aebingham2 at gmail.com
> LinkedIn Profile: www.linkedin.com/pub/allen-bingham/3b/556/325
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

Yes, this is the wrong list.  Your question is about SAS (that is what 
SAS-L or SAScommunity is about) and this list is about R, and you 
already know what function to use in R.  That said, I searched for "SAS 
round to fixed number of significant digits" and found this link

http://support.sas.com/kb/24/728.html

You could turn this into a function style macro (but it will be ugly). 
If you have a recent enough version of SAS you could use PROC FCMP to 
turn this into a function.

If you are interested contact me offline and I will send you a PROC FCMP 
implementation.


Dan

-- 
Daniel Nordlund
Bothell, WA USA



More information about the R-help mailing list