Re: [R] SAS Proc summary/means as a R function

2010-07-13 Thread Roger Deangelis
Thanks Richard and Erik, I hate to buy the book and not find the solution to the following: proc.means <- function() { deparse(match.call()[-1]) } proc.means(this is a sentence) unexpected symbol in "proc means(this is) One possible solution would be to 'peek' into the memory buffer

[R] SAS Proc summary/means as a R function

2010-07-12 Thread Roger Deangelis
Hi, I am new to R. I am trying to create an R function to do a SAS proc means/summary proc.means ( data=bsebal; class team year; var ab h; output out=BseBalAvg mean=; run;) I have a solution if I quote the the

Re: [R] Best way to compute a sum

2010-07-04 Thread Roger Deangelis
Hi Bernado, In many financial applications if you convert the dollars and cents to pennies( ie $1.10 to 110) and divide by 100 at the vary end you can get maintain higher precision. This applies primarily to sums. This is similar to keeping track of the decimal fractions which have exact represen

Re: [R] Best way to compute a sum

2010-07-03 Thread Roger Deangelis
Although it does not apply to your series and is impractical, it seems to me that the most accurate algorithm might be to add all the rational numbers whose sum and components can be represented without error in binary first, ie 2.5 + .5 or 1/16 + 1/16 + 1/8. You could also get very clever

Re: [R] SAS and R on multiple operating systems

2010-04-07 Thread Roger DeAngelis(xlr82sas)
Hi, SASweave is an interesting concept and is further along than I thought. Thanks Donald. I have checked out many sources on the net. Also thanks for offering to help me get started. I have a masters in stat, not a Phd and I spend most of my time programming so I am a little over my had wit

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Thanks Dennis, Thanks for taking the time that was a very informed response. It was a teachable moment for me. I didn't know about the breath and depth of LaTeX. I need to do some self education. Unfortunately I don't see how to integrate LaTeX with SAS, since SAS has its own template/ta

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Hi, I agree with Barry, but there are some of us out there that are trying to change the image of big Pharma. R helps statisticians do real science. I have complained for about 10 years about EXCEL and WORD driving the delivery of inputs and outputs. Years ago, I did a short gig with contrac

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Roger DeAngelis(xlr82sas)
Hi, Just a couple of notes to reply to others questions. 1. unx is a file handle that points to my UNIX SAS work directory(like an R workspace). This directory is not mounted under windows. most of the SAS objects, ie SAS datasets in the 64bit Unix directory are available to my windows SAS p

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread 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

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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 pad

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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-p

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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 S

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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 persisten

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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.

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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 s

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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 li

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread 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

[R] SAS and R on multiple operating systems

2010-04-05 Thread 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 (

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi, It looks like we may need to swap bytes(little endian to big endian). I will look into it tonight. As a side note, SAS reserves 28 floats for missing values. It should be easy to convert these to NaN on input to R. You can test this in SAS by converting the 16 char floats to ieee8. in S

Re: [R] Reading sas7bdat files directly

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi All, The hack below might help R users get going with Chris's DSREAD. I have not had a chance to look at Monday's version of DSREAD, can't wait. Note Duncan Murdoch was most gracious to supply me with a R function to translate floats in 16 char hex to R floats. Your utility solves the 200

Re: [R] Converting IEEE Float in 16 char hex back to float

2010-03-01 Thread Roger DeAngelis(xlr82sas)
Hi, DSREAD utility solves the 200 byte, 8 char name and potential precision errors with other methods of transfering SAS datasets to perl and R. Importing SAS datasets(sas7bdat) into R (32 bit windows 2000, 32 bit SAS 9.2 and 32 bit R version 2.9.0 (2009-04-17) Here is what I want to