----- Original Message ----- From: "John Kane" <[EMAIL PROTECTED]> To: "lamack lamack" <[EMAIL PROTECTED]>; <R-help@stat.math.ethz.ch> Sent: Tuesday, March 06, 2007 2:13 PM Subject: Re: [R] R and SAS proc format
> > --- lamack lamack <[EMAIL PROTECTED]> wrote: > >> Dear all, Is there an R equivalent to SAS's proc >> format? > > What does the SAS PROC FORMAT do? It formats or reformats data in the SAS system. It looks this: proc format; value kanefmt 1='A' 2='B' 3='C' 4='X' 5='Throw me out'; data temp; do i=1 to 10; kanevar=put(i,kanefmt.); output; end; proc print; run; And produces this: Obs i kanevar 1 1 A 2 2 B 3 3 C 4 4 X 5 5 Throw me out 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 But it is more robust than what is shown here. > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > ______________________________________________ R-help@stat.math.ethz.ch 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.