SAS and R on multiple operating systems

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
Hi,

This is not meant to be critical of R, but is intended as
a possible source for improvements to R.
SAS needs the competition.


I am reasonably knowledgeable about

R
SAS-(all products including IML)

SAS and R run on

Windows(all flavors)
UNIX(all flavors)
Apple OSs

Does R run on natively (no emulation)?
We have quite a few users on these systems

VAX-VMS
Z-OS (mainframe)
MVS
VM/CMS(IBM)


SAS had the notion in the 80's of a logon to SAS and
connections to mutiple operating systems simultaneously,
making all operating systems look like one.
SAS has native low level functions like dcreate(create directory), fopen, fread..
that can be used on all operating systems eliminating
operating specific commands, like dir(windows), ls(unix) and ispf(3.4 on mainframes).

SAS provides one IDE to multiple operating systems simultaneously.

For instance:

Run under windows(slightly simplified)

libname unx work server=unix;  /* SAS work directory on UNIX - can be a virtual storage system like EMC */

data "c:\tmp\class.sas7bdat"; /* create sas dataset class in windows */
  set unx.class; /* dataset class is in the UNIX work directory - not mounted in windows */
run;

or

libname xls "c:\temp\test.xls"; /* does not have to exist */

data xls.class;  /* create excel file under windows */
  set unx.class; /* remote unix system - file system not mounted in windows */
run;

You can mix mainframe, windows and unix.

Other functions I use all the time when coding SAS.

1. Highlight a block of code and hit F1 and the code is run
   interactivel under windows.

2. Highlight and hit F2 and the code is run
   batch under windows.

3. Highlight and hit F3 and the code is run
   interactively in unix.

4. Highlight and hit F4 and the code is run
   batch in unix.

5. Highlight "c:\tmp\class.sas7bdat" in the editor and
   hit F5 and a proc contents appears in the output window

6. Highlight "c:\tmp\class.sas7bdat" in the editor and
   hit F6 and 40 obs appear in the output window

6. Highlight "c:\tmp\class.sas7bdat" type freq name*sex and
   a frequency analysis appears in the output window.

I think the real power of SAS is the ability to run
all of SAS from command line without affecting the IDE.
I have about 50 commands that interact with the
editor and multiple operating systems to do useful work.


As far as I am concerned SAS-IML is dead.
R is much more powerful.
The key for SAS is a 'drop down to R from SAS'.
The current implementation in IML is absurd, because
you do not need IML.
SAS is resisting this because of its investment in IML.
Dataframes and SAS datasets have a lot in common.
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Thomas Lumley
On Mon, 5 Apr 2010, Roger DeAngelis(xlr82sas) wrote:

> SAS and R run on
>
> Windows(all flavors)
> UNIX(all flavors)
> Apple OSs

I would expect that for more obscure Unices it would be difficult to get SAS, but basically, yes.

> Does R run on natively (no emulation)?
> We have quite a few users on these systems
>
> VAX-VMS
> Z-OS (mainframe)
> MVS
> VM/CMS(IBM)

I don't know that anyone has tried. The basic requirements for R are ANSI C89 and some of the more common parts of C99, Fortran 77, the standard IEEE floating point formats, and quite a lot of POSIX.

For IBM's z/OS at least, I would have thought Linux virtualization would be the most straightforward approach to using R.

      -thomas

Thomas Lumley Assoc. Professor, Biostatistics
[hidden email] University of Washington, Seattle

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Kevin Middleton-3
In reply to this post by Roger DeAngelis(xlr82sas)
> SAS and R run on
>
> Windows(all flavors)
> UNIX(all flavors)
> Apple OSs

According to SAS (http://support.sas.com/kb/33/140.html and http://support.sas.com/kb/22/960.html), SAS will not run on OS X past 10.4. OS X 10.5 was released in late 2007, so I don't think it's really fair to say that SAS runs on Apple OSs.


-------------------------------------------------
Kevin M. Middleton
Department of Biology
California State University San Bernardino
______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  You are correct SAS no longer supports OS X under SAS-Proper. I use the term SAS-Proper for base SAS with SAS-Connect. It does appear that some improper SAS products are supported under MAC OS?


SAS releases JMP® 8 for Mac, Linux
Users of all major desktop operating systems can now explore and visualize data through intuitive drag-and-drop interaction

CARY, NC  (Apr. 28, 2009)  –  SAS, the leader in business analytics, today begins shipping JMP 8 statistical discovery software for Macintosh and Linux. SAS also starts shipping JMP 64-Bit Edition, Version 8, for both of these operating systems. These releases extend JMP’s groundbreaking new way to explore and visualize data to more users.

I get very confused with the myriad of SAS products.
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

barry rowlingson
In reply to this post by Roger DeAngelis(xlr82sas)
On Mon, Apr 5, 2010 at 9:13 PM, Roger DeAngelis(xlr82sas)
<[hidden email]> wrote:

>
> Hi,
>
> This is not meant to be critical of R, but is intended as
> a possible source for improvements to R.
> SAS needs the competition.
>
>
> I am reasonably knowledgeable about
>
> R
> SAS-(all products including IML)

> SAS has native low level functions like dcreate(create directory), fopen,
> fread..
> that can be used on all operating systems eliminating
> operating specific commands, like dir(windows), ls(unix) and ispf(3.4 on
> mainframes).

 ...so your reasonable knowledge of R doesn't extend to
help.search("file") and then typing "?files" then? :)

> SAS provides one IDE to multiple operating systems simultaneously.

 Seems to be two things going on here - file system access and SAS execution:

> data "c:\tmp\class.sas7bdat"; /* create sas dataset class in windows */
>  set unx.class; /* dataset class is in the UNIX work directory - not
> mounted in windows */
> run;

 - if this is some kind of abstraction of a network file system then
it's best done at the OS level. On my Linux box, for example, I can
use smbfs to connect to my Windows network file system. Then I can
read, write, edit those files with anything on my Linux box. Having an
application punch through a network to a custom server using some
unknown (possibly insecure) protocol for a specific purpose seems a
bit pointless when you can do it at the OS level using a secure
protocol (smbfs secure? Ummm transport it over ssh of course...)


> libname xls "c:\temp\test.xls"; /* does not have to exist */
>
> data xls.class;  /* create excel file under windows */
>  set unx.class; /* remote unix system - file system not mounted in windows
> */
> run;

 - Not sure I understand what these do. Is 'unx' a special word here?
Does the .class mean something? What is 'set' setting?

> Other functions I use all the time when coding SAS.
>
> 1. Highlight a block of code and hit F1 and the code is run
>   interactivel under windows.

> 3. Highlight and hit F3 and the code is run
>   interactively in unix.

Okay, what's going on here? You have a Windows box (presumably in
front of you) and a Unix box somewhere on the network. And hitting F1
runs it on the Windows box and hitting F4 magically runs it on the
Unix box? I'm guessing this isn't SAS straight-out-of-the-box, someone
has set this all up carefully (for example, how do you authenticate to
the Unix box?).

 This is actually a nice paradigm. Users are developing code on their
desktops with N=10 and then can launch it on the mainframe with
N=100000000 with a single button press.

Again, you could implement this at the operating system level with
ssh. I can do:

 ssh fnordbox R CMD BATCH analysis.R analysis.Rout

and it would run the job on my machine fnordbox. Obviously it would
need access to the .R and any data files but thanks to the miracle of
shared network file systems it can do that. It's not one-button
execution, but it's likely that any one-button execution you have is
hiding a lot of setup behind it - such as authorisation and
authentication to the remote system.

 Another way of doing this would be to use Rserve, a general R
execution server.

 Of course things on R, like many open-source projects, get done
either by people to scratch an itch they have themselves, or by people
paid to scratch other people's itches. I'm not sure duplicating some
of SAS's enterprisey functionality is likely to itch enough for people
to do it, when the cheaper option of learning the R (or Unixy) way of
doing it is much more flexible...

Barry

--
blog: http://geospaced.blogspot.com/
web: http://www.maths.lancs.ac.uk/~rowlings
web: http://www.rowlingson.com/
twitter: http://twitter.com/geospacedman
pics: http://www.flickr.com/photos/spacedman

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Stuart Luppescu
On Mon, 2010-04-05 at 23:12 +0100, Barry Rowlingson wrote:
> > 3. Highlight and hit F3 and the code is run
> >   interactively in unix.
>
> Okay, what's going on here? You have a Windows box (presumably in
> front of you) and a Unix box somewhere on the network. And hitting F1
> runs it on the Windows box and hitting F4 magically runs it on the
> Unix box? I'm guessing this isn't SAS straight-out-of-the-box, someone
> has set this all up carefully (for example, how do you authenticate to
> the Unix box?).

This is probably the facility provided by ess under emacs. You can get
the same thing with R in ess by highlighting the code and pressing C-c
C-r (or C-c C-b to run the whole program).
--
Stuart Luppescu <[hidden email]>
University of Chicago

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  I am using SSH, however I do have to set up a SAS Spawner on the remote host and use SAS remote library services. I also have to have listeners on both client and host?

  I am not a systems guy, so I do not know exactly how SAS makes the remote libraries available to windows.

  It is a little trickier to get UNIX to recognize my windows 'c' drive.

  It is quite powerful to take the idiosyncracies of operating systems out of the picture, I think perl is little closer to doing this than R. The stat function in perl appears to be able to operate on windows and unix filesystems, however separately. Many SAS objects like datasets are exactly the same between windows(32/64) and corresponding unix systems. No big endian little endian stuff to worry about.

Here is my program  
                     
%put &sysscp;    /* Show OS */                
%let pth=%sysfunc(pathname(unx)); /* SHOW UNIX PATH */
%put pth=&pth;                  
data "c:\temp\class.sas7bdat";   /* WINDOWS */
  set unx.class;                
run;          

Here is the log showing I am running under windows but input is unix

28     %put &sysscp;
SYMBOLGEN:  Macro variable SYSSCP resolves to WIN
WIN
29     %let pth=%sysfunc(pathname(unx));
30     %put pth=&pth;
SYMBOLGEN:  Macro variable PTH resolves to /workspace/SAS_work904200004DF5_zeus_unix
pth=/workspace/SAS_work904200004DF5_global_unix_server
31     data "c:\temp\class.sas7bdat";
32       set unx.class;
33     run;
                 
NOTE: There were 19 observations read from the data set UNX.CLASS.
NOTE: The data set c:\temp\class.sas7bdat has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds

I can even concatenate windows and unix SAS datasets.


Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  Here is the SAS command macro that reads what I highlight in my editor and prints 40 observations from the highlighted dataset after hitting the function key F4

F4 stores the highlighted text in the clipboard then executes the command macro, the rsubmit executes the code on the unix zeus server. (Slight modification on the rsubmit for clarity only)

Function key setting

F4         store;note;notesubmit '%uxp';       /* 40  obs from highlighted dataset       */  

Command macro

%macro uxp;                                
FILENAME clp clipbrd ;                      
DATA _NULL_;                                
  INFILE clp;                              
  INPUT;                                    
  put _infile_;                            
  call symputx('argx',_infile_);            
RUN;                                        
dm "out;clear;";                            
%put argx=&argx.;                          
%syslput argx=&argx;                        
rsubmit zeus;                                    
footnote;                                  
title "Up to 40 obs from &argx";            
options nocenter;                          
proc print data=&argx( Obs= 40 ) width=min;
format _all_;                              
run;                                        
endrsubmit zeus;                                
dm "out;top";                              
%mend uxp;                                  
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  One other point.

  The connection I have with mutiple servers is persistent the windows SAS executable is is constant contact with all the SAS server executables.

  Also I can submit a job where unix code is interspersed with windows code.

  I do execute R and perl from SAS using pipes. I am experimenting with SAS Java objects for tighter intergration of SAS with perl and R.

  As a side note in the pharmaceutical industry we can often develop under windows, but production code must be Unix and the logs must be absolutely clean.

 One drawback is SAS handling of interrupts, I sometimes have difficulty interrupting a server job from windows.

Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  One final point about persistent simultaneous environments.

  In windows I sit in my development directory(PWD) and simultaneously my Unix session sits in my production directory(PWD). This simplifies versioning,  promotion to production and batch execution.

  My Unix session is persistent so my work directory, macro variables, configuration settings persist form one interactive submission to the next. I can easily change things like debugging options for just one block of code. If I want to run some code in the 'clean production environment' I just submit it to unix batch.

 I think all the suggestions so far have been 'batch' execution on the server.

Regards

 
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Daniel Nordlund-2
In reply to this post by Roger DeAngelis(xlr82sas)
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of Roger DeAngelis(xlr82sas)
> Sent: Monday, April 05, 2010 3:35 PM
> To: [hidden email]
> Subject: Re: [R] SAS and R on multiple operating systems
>
>
> Hi,
>
>   I am using SSH, however I do have to set up a SAS Spawner on the remote
> host and use SAS remote library services. I also have to have listeners on
> both client and host?
>
>   I am not a systems guy, so I do not know exactly how SAS makes the
> remote
> libraries available to windows.
>
>   It is a little trickier to get UNIX to recognize my windows 'c' drive.
>
>   It is quite powerful to take the idiosyncracies of operating systems out
> of the picture, I think perl is little closer to doing this than R. The
> stat
> function in perl appears to be able to operate on windows and unix
> filesystems, however separately. Many SAS objects like datasets are
> exactly
> the same between windows(32/64) and corresponding unix systems. No big
> endian little endian stuff to worry about.

Well, this is not exactly correct. SAS datasets on Windows 32-bit and 64-bit systems do use a different file format, and the format is different from Unix/Linux systems.  SAS will automagically use the cross-environment data access (CEDA) engine, where possible, for reading SAS datasets created in different environments.  So what you describe below can be done, but only because SAS handles the file conversion relatively transparently.  And while the CEDA engine allows one to read datasets from other environments, there can be a performance hit when doing so.

>
> Here is my program
>
> %put &sysscp;    /* Show OS */
> %let pth=%sysfunc(pathname(unx)); /* SHOW UNIX PATH */
> %put pth=&pth;
> data "c:\temp\class.sas7bdat";   /* WINDOWS */
>   set unx.class;
> run;
>
> Here is the log showing I am running under windows but input is unix
>
> 28     %put &sysscp;
> SYMBOLGEN:  Macro variable SYSSCP resolves to WIN
> WIN
> 29     %let pth=%sysfunc(pathname(unx));
> 30     %put pth=&pth;
> SYMBOLGEN:  Macro variable PTH resolves to
> /workspace/SAS_work904200004DF5_zeus_unix
> pth=/workspace/SAS_work904200004DF5_global_unix_server
> 31     data "c:\temp\class.sas7bdat";
> 32       set unx.class;
> 33     run;
>
> NOTE: There were 19 observations read from the data set UNX.CLASS.
> NOTE: The data set c:\temp\class.sas7bdat has 19 observations and 5
> variables.
> NOTE: DATA statement used (Total process time):
>       real time           0.04 seconds
>       cpu time            0.01 seconds
>
> I can even concatenate windows and unix SAS datasets.
>
>

Hope this helpful,

Dan

Daniel Nordlund
Bothell, WA USA
 

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

 You are absolutely correct about 32/64 and it appears to be a severe penalty. But I think 32 to 32(win/unix) does not incur the penalty. There are even more issues between mainframe and unix/windows. The 32 to 64 is a big hit when querying data dictionaries that have a mixture of 32/64 bit SAS objects.

As a side note,  I could reload the R workspace between batch submissions to maintain consistent environments.

I do support quite a few statisticians and I try to get them to think more in terms of R especially those that use IML, but unlike Frank I feel there are several areas where SAS is the more logical solution. I think SAS(9.22) is a little ahead of R in SVG graphics(the future) and graphic editors and unlike Frank I don't think R and LaTex is more powerful than ods/tagsets and SAS reporting/graph procedures. Imbeding graphic objects inside proc report is powerful, see

http://homepage.mac.com/magdelina/.Public/met_may_103.rtf

And I know SAS  allows some merging of cells in proc report so arbitrary objects, like graphs can be merged into proc report.

The pharma industry externals tend to be MS-Word and Excel, although final FDA documents are usually pdf. So whatever I do I have to make my final product look good in word. This can be a real challenge because of words faulty import engines. I would have preferred postscript where R would be a real contender.

I also remember that SAS won a recent graphics award and I think is was competing against R.
I don't have the link and I hope I am correct.

see for some SAS graphics

http://robslink.com/SAS/Home.htm

The real strength of R is in the flexibilty of its statistical functions. Sometimes SAS makes the wrong or illogical decisions with its canned routines.






 
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Gabor Grothendieck
On Mon, Apr 5, 2010 at 8:34 PM, Roger DeAngelis(xlr82sas)
<[hidden email]> wrote:

>
> Hi,
>
>  You are absolutely correct about 32/64 and it appears to be a severe
> penalty. But I think 32 to 32(win/unix) does not incur the penalty. There
> are even more issues between mainframe and unix/windows. The 32 to 64 is a
> big hit when querying data dictionaries that have a mixture of 32/64 bit SAS
> objects.
>
> As a side note,  I could reload the R workspace between batch submissions to
> maintain consistent environments.
>
> I do support quite a few statisticians and I try to get them to think more
> in terms of R especially those that use IML, but unlike Frank I feel there
> are several areas where SAS is the more logical solution. I think SAS(9.22)
> is a little ahead of R in SVG graphics(the future) and graphic editors and
> unlike Frank I don't think R and LaTex is more powerful than ods/tagsets and
> SAS reporting/graph procedures. Imbeding graphic objects inside proc report
> is powerful, see
>
> http://homepage.mac.com/magdelina/.Public/met_may_103.rtf

This seems quite comparable:

library(meta)
example(forest)

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Douglas Bates-2
In reply to this post by Roger DeAngelis(xlr82sas)
On Mon, Apr 5, 2010 at 3:13 PM, Roger DeAngelis(xlr82sas)
<[hidden email]> wrote:

>
> Hi,
>
> This is not meant to be critical of R, but is intended as
> a possible source for improvements to R.
> SAS needs the competition.
>
>
> I am reasonably knowledgeable about
>
> R
> SAS-(all products including IML)
>
> SAS and R run on
>
> Windows(all flavors)
> UNIX(all flavors)
> Apple OSs
>
> Does R run on natively (no emulation)?
> We have quite a few users on these systems
>
> VAX-VMS
> Z-OS (mainframe)
> MVS
> VM/CMS(IBM)
...

Just out of curiosity, do you really know of anyone who is running a
VAX-VMS system at present?  My recollection of VAX minicomputers and
VaxStations is that they would be considerably less powerful, have
much less memory and possibly less disk space than a $250 netbook.
The first VAX at our university, a VAX-11/780, was allegedly a "1
MIPS" machine but it was pretty difficult to get it to do a million of
any instruction in one second.  I eventually succeeded because it had
a special instruction for decrement and branch on zero so if you
loaded a register with 100000 and put it in a tight loop of that one
instruction, it was able to count from 100000 down to zero within a
second.  When I bought the second Vax on the campus, a less powerful
Vax-11/750, I was considered extravagant because I equipped it with a
*second* megabyte of memory (at a cost of about $9000).

I recently bought an Intel Atom and Nvidia ION based "nettop" computer
for $330.  That computer has a dual-core 1.6 GHz processor, plus 2GB
of memory and 160 GB SATA hard drive.  I expect the electricity and
air conditioning bill for running a VAX would probably hit $300 after
a few months, and that isn't even counting the cost of buying it and
paying for (probably very old) operators to take care of it.  And for
that you would get a computer that is less than 1/100th as powerful as
the micro desktop.  Why would anyone do that?

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  Again I slight mistake on my part. One of the largest Pharmaceutical Contract companies uses VMS. I erroneously added the VAX in front from my memory. I don't want to mention the company, but if anyone else there is familiar with contact pharma companies, one of these uses VMS(extensively-probably not on a VAX), ICON, PPD, PRA, Quintile or Covance.

Here is an excerpt from a recent email

I WILL BE OUT OF OFFICE 3/24-3/31 AND RETURN ON 4/1.  
I WILL NOT HAVE ACCESS TO EMAILS AND VMS.

FOR USING THE REFLECTION "HOST - UNIX AND OPENVMS"

I also know the programmer uses SAS on VMS

Regards
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  About the forest plot.

   Some Phrarma companies demand the report and graphics follow very restrictive layouts.

   SAS allows uses to use one template for graphs and tables.

   Margins have to the same for all reports.
   Fonts, fontsizes, linewidths, boxing body, cell spacing, cell padding ...

   The output has to look perfect in MS-Word.

    I am not a R graphics expert but I tried to run the forest plot and output the graphs to png and svg.
In both cases the plots were mangled. This was probably not fair, because it looked like the SVG issue was just a font size issue and the png issues was a width issue, but I know SAS tends to produce graphs that can be scaled post processing.

I also imported the png into word and is was right clipped.

 devSVG(file = "c:\\temp\\Rplots.svg", width = 10, height = 8,  
 bg = "white", fg = "black", onefile=TRUE, xmlHeader=TRUE)      
 example(forest)                                                
 dev.off()                                                      

png("c:\\temp\\myplot.png", bg="transparent", width=700, height=500)
example(forest)                                                    
dev.off()                                                          

 Also I have seen 5,000 page listings in SAS.


Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Peter Dalgaard-2
In reply to this post by Douglas Bates-2
Douglas Bates wrote:
> The first VAX at our university, a VAX-11/780, was allegedly a "1
> MIPS" machine but it was pretty difficult to get it to do a million of
> any instruction in one second.  I eventually succeeded because it had
> a special instruction for decrement and branch on zero so if you
> loaded a register with 100000 and put it in a tight loop of that one
> instruction, it was able to count from 100000 down to zero within a
> second.  When I bought the second Vax on the campus, a less powerful
> Vax-11/750, I was considered extravagant because I equipped it with a
> *second* megabyte of memory (at a cost of about $9000).

You will probably remember the unfortunate name-collision with an
industrial strength vacuum cleaner. The latter alledgedly had a large
advertising campaign with the slogan "Nothing sucks like a VAX".

--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Phone: (+45)38153501
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Frank Harrell
In reply to this post by Roger DeAngelis(xlr82sas)
Roger DeAngelis(xlr82sas) wrote:
> Hi,
>
>   About the forest plot.
>
>    Some Phrarma companies demand the report and graphics follow very
> restrictive layouts.

Thank goodness that the FDA does not require that.
Frank

>
>    SAS allows uses to use one template for graphs and tables.
>
>    Margins have to the same for all reports.
>    Fonts, fontsizes, linewidths, boxing body, cell spacing, cell padding ...
>
>    The output has to look perfect in MS-Word.
>
>     I am not a R graphics expert but I tried to run the forest plot and
> output the graphs to png and svg.
> In both cases the plots were mangled. This was probably not fair, because it
> looked like the SVG issue was just a font size issue and the png issues was
> a width issue, but I know SAS tends to produce graphs that can be scaled
> post processing.
>
> I also imported the png into word and is was right clipped.
>
>  devSVG(file = "c:\\temp\\Rplots.svg", width = 10, height = 8,  
>  bg = "white", fg = "black", onefile=TRUE, xmlHeader=TRUE)      
>  example(forest)                                                
>  dev.off()                                                      
>
> png("c:\\temp\\myplot.png", bg="transparent", width=700, height=500)
> example(forest)                                                    
> dev.off()                                                          
>
>  Also I have seen 5,000 page listings in SAS.
>
>
>


--
Frank E Harrell Jr   Professor and Chairman        School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] 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.
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

hadley wickham
In reply to this post by Roger DeAngelis(xlr82sas)
>  Also I have seen 5,000 page listings in SAS.

Is this a pro or a con?

Hadley

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS and R on multiple operating systems

Roger DeAngelis(xlr82sas)
In reply to this post by Roger DeAngelis(xlr82sas)
Hi,

  First a quick note about FDA and Style Guides.

  Frank is correct the FDA does not require strict formatting. I once worked for small startup and they sent EXCEL sheets to the FDA. However big pharma usually has very strict formatting requirements. I once produced a table where one of the border lines was a little to fat (not 1/2 point). Below is a abreviated sanitized TOC for a possible style guide. The official guide is over 50 pages. The controlled document guide is over 100 pages.

There is even more detail in the text of this document with sample tables, listings and graphs.

I have some code on my site that makes, procedure output, graphs, tables and listings follow one SAS template.

. LAYOUT
x.S Components of Document
x.2 Page Layout
x.2.S Portrait Page
x.2.2 Turned Page
x.2.3 Landscape Page
x.3 Page Margins
x.T Document Headers and Footers
x.K.S Regulatory Submissions
x.K.2 Study Reports, IBs, and
2.8 Lists
2.G Numbers
2.S0 Superscripts and Subscripts
2.S1 Symbols
2.Sx.S Spacing Around Symbols
2.Sx.2 Degree Sign
2.Sx.T Percentage Sign
2.Sx.3 Greek Symbols
2.Sx.D Use of Trademark Symbols
2.S2 Units of Measure
2.S2.S Abbreviations
2.S2.2 Standard Abbreviations
7. TABLES.
7.S Placement
7.3 Numbering
7.2 Borders and Internal Lines
7.T Titles
7.D Column Headings
7.D.S Alignment of Column Headings
7.D.2 Capitalization of Column Headings
P Data Fromat
7.L Data Format
7.L.S Font and Type Size
7.L.2 Table Cell Size
7.L.3 Aligning Data
7.L.T Decimals
7.8 Footnotes in Tables
7.G Source Code
7.S0 Multipage Tables
GRAPHS
z.S Placement
z.2 Numbering
z.3 Titles
z.T Figure Legends
z.D Source Code
Table 2-K. Ewquired Guidelines Regarding Capitalization
Table 2-5. Ewquired Guidelines Regarding Use of Numbers
Table 3-x. Ewquired Guidelines Regarding Use of Hyphens
Table Z-x. Table Borders
Table Z-2. Standard Table Numbering and Categories
Table Z-3. Table With Center-aligned Columns
Table Z-K. Table With Decimal-aligned Data and Pairs of Numbers
Table Z-5. Table With Columns of Dissimilar Numeric Data
Table Z-6. Table With 1 Type of Value per Column
Table Z-7. Table With Unavailable Data
Table Z-8. Table With Abbreviated Units of Measure
Table Z-G. Table With Footnotes
Table Z-10 Subject Disposition Table With Source Code
List of Figures
Figure Q-1 Page Layouts for US Letter Paper
Figure Z-1 Basic Components of a Table
Figure Z-2 Bottom Align Buttons on Tables and Borders Toolbar
Figure Q-3  Figure With Source Code

The margin settings (both Ax and
US letter-sized paper). These margins create a common text area of x.xx x x that will
prevent text from reflowing when switched from x paper size to another.
Page Margins
x.x x xx (US letter) paper Ax paper
Portrait Landscape Portrait Landscape
Top x.0 x.x x.0 x.xx
Bottom 0.xx x.0 x.xx x.0
Left x.x 0.xx x.xx x.xx
Right x.0 x.0 x.0 x.0
Headera 0.xx 0.xx 0.x 0.xx
Footera 0.xx 0.xx 0.x 0.x
a This is a Word-specific setting. The measurement is from the edge of the page.

single lines only. Follow these specifications as closely as possible (see Table x-x for
example):
• If the table is created in MS Word, use the ½-point line default.
• If another software application is used to generate the table, use a line as close to
½ point as possible.
• Use the same line weight throughout the table.

 
12