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

Allen Bingham
2015-02-10T17:22:44Z

Daniel,

Thanks for the link and the advice (vis-?-vis SAS-L ... after 30+ years of
using SAS I should have remembered that one which I used extensively when
learning SAS).

FYI-I'm working on some R code that may eventually need to be ported to SAS
--- and hence the reason for my question --- I don't want to use code in R
that might be too difficult to replicate in SAS.

I'll send you  a separate email about the PROC FCMP implementation you
mentioned.

Thanks again-Allen

-----Original Message-----
From: Daniel Nordlund [mailto:djnordlund at frontier.com]
Sent: Monday, February 9, 2015 11:05 PM
To: Allen Bingham; r-help at r-project.org
Subject: Re: [R] SAS equivalent for R's signif function?

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