Re: [R] SAS to R: I would like to replicate a statistical analysis performed in SAS in R.

2011-11-30 Thread Ben Bolker
Marianne Stephan hotmail.com> writes: > A statistician performed an analysis in SAS for me which I would > like to replicate in R. I have however problems in figuring out the > R code to do that. As I understood it was a "covariance regression > model". In the analysis, baseline was used as cov

[R] SAS to R: I would like to replicate a statistical analysis performed in SAS in R.

2011-11-30 Thread Marianne Stephan
Hello everybody, A statistician performed an analysis in SAS for me which I would like to replicate in R. I have however problems in figuring out the R code to do that. As I understood it was a "covariance regression model". In the analysis, baseline was used as covariate and autoregressive

Re: [R] Sas to R

2010-09-15 Thread Sarah Jilani
Thanks Josh and Dan! I got it to work using the following code that Dan had suggested. x """D:\Program Files\R\R-2.9.2\bin\R.exe"" --no-save --quiet < ""&rsource.\Rtest.R"" > ""&rsource.\Rtest.log"""; Thanks for your help!! :) Sarah On Wed, Sep 15, 2010 at 2:58 PM, Joshua Wiley wrote: > Hi

Re: [R] Sas to R

2010-09-15 Thread Joshua Wiley
Hi Sarah, Just a couple additional notes to what's been said: 1) It seems like R CMD BATCH might be easier 2) If the space in Program Files is causing issues, you can use the Windows environment variable %PROGRAMFILES% (which also means you do not need the drive letter. 3) I find it handy to defi

Re: [R] Sas to R

2010-09-15 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Sarah Jilani > Sent: Wednesday, September 15, 2010 10:44 AM > To: r-help@r-project.org > Subject: [R] Sas to R > > Hi, > > I need to call an R

Re: [R] Sas to R

2010-09-15 Thread Erik Iverson
David Winsemius wrote: On Sep 15, 2010, at 1:44 PM, Sarah Jilani wrote: Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says I went searching for a worked example and found this: http://www.nesug.or

Re: [R] Sas to R

2010-09-15 Thread David Winsemius
On Sep 15, 2010, at 1:44 PM, Sarah Jilani wrote: Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says I went searching for a worked example and found this: http://www.nesug.org/proceedings/nesug08/sa/

Re: [R] Sas to R

2010-09-15 Thread Erik Iverson
Sarah, This is a SAS question, not R. However, it seems clear that it has something to do with the fact that there are spaces in the command that you're sending to Windows. Maybe try calling with the 'short directory name' notation, I forget what that's called in Windows. Or else follow-up on

[R] Sas to R

2010-09-15 Thread Sarah Jilani
Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says 'D:\Program' is not recognized as an internal or external command, operable program or batch file. ] SAS CODE: options xwait xsync; %let Rsource=S:\EPI_Dat

[R] SAS to R

2010-07-12 Thread trekvana
Hi everyone I dont know how to code in SAS but I do know how to code in R. Can someone please be kind enough to translate this into R code for me: proc mixed data = small method = reml; class id day; model weight = day/ solution ddfm = bw; repeated day/ subject=id type = unstructured; run; ==

[R] SAS to R - if you have SAS 8.2+

2007-12-28 Thread Gyula Gulyas
Hi there, the attached R function uses the SAS Integrated Object Model (IOM) and it can deal with SAS dates and long variable names. All you need to provide is the folder where the SAS data file is and the data file name without the extension. The function requires the rcom package. This is meant

Re: [R] SAS to R - if you don't have a SAS license

2007-12-28 Thread Frank E Harrell Jr
Marc Schwartz wrote: > On Fri, 2007-12-28 at 11:21 -0600, Frank E Harrell Jr wrote: >> Wensui Liu wrote: >>> while I move data between SAS and R all the time, personally I don't >>> think your recommendation is very practical. Instead, I feel SAS >>> transport file is much better than csv. >>> >>>

Re: [R] SAS to R - if you don't have a SAS license

2007-12-28 Thread Marc Schwartz
On Fri, 2007-12-28 at 11:21 -0600, Frank E Harrell Jr wrote: > Wensui Liu wrote: > > while I move data between SAS and R all the time, personally I don't > > think your recommendation is very practical. Instead, I feel SAS > > transport file is much better than csv. > > > > Plus, the sas dataset

Re: [R] SAS to R - if you don't have a SAS license

2007-12-28 Thread Frank E Harrell Jr
Wensui Liu wrote: > while I move data between SAS and R all the time, personally I don't > think your recommendation is very practical. Instead, I feel SAS > transport file is much better than csv. > > Plus, the sas dataset created on unix can't be opened by sas viewer on > windows. It is even und

Re: [R] SAS to R - if you don't have a SAS license

2007-12-27 Thread Wensui Liu
while I move data between SAS and R all the time, personally I don't think your recommendation is very practical. Instead, I feel SAS transport file is much better than csv. Plus, the sas dataset created on unix can't be opened by sas viewer on windows. It is even undoable if the dataset is large.

[R] SAS to R - if you don't have a SAS license

2007-12-27 Thread Gyula Gulyas
Hi all, if you do not have a SAS license but want to convert native SAS data files, the solution below will work. # read SAS data without SAS # 1. Download free SAS System Viewer from either of the sites below: # http://www.sas.com/apps/demosdownloads/setupcat.jsp?cat=SAS+System+Viewer (re