Re: [R] Hollander's test of bivariate symmetry

2009-03-22 Thread joseph . g . boyer
Couldn't find it anywhere, so for future users who stumble on this thread, here is some code. Note: If your data has missing values, delete those observations from the data first before running this code. Place these functions in the global environment (ie run the code below). Then, to obtain t

[R] replying to old thread

2009-03-21 Thread joseph . g . boyer
If you come across an archived thread that you would like to reply to, how do you reply to it without starting a new thread? Joe Boyer Statistical Sciences Renaissance Bldg 510, 3233-D Mail Stop RN0320 8-275-3661 cell: (610) 209-8531 [[alternative HTML version deleted]] ___

[R] Hollander's test of bivariate symmetry

2009-02-11 Thread joseph . g . boyer
Does anyone know if any R package has a function that will conduct Hollander's test of bivariate symmetry? (Hollander, Biometrika, 1971) Either the exact test or an asymptotic version would be sufficient for my purposes. Thanks. Joe Boyer Statistical Sciences Renaissance Bldg 510, 3233-D

[R] RExcel waiting for OLE action

2009-02-06 Thread joseph . g . boyer
When I run a macro that uses RExcel, I get a dialog box that says "Microsoft Excel is waiting for another application to complete an OLE action." There is no error in the RExcel commands in the macro, of that I am sure. The box appears to be related to the inclusion of RunRFile commands. The m

Re: [R] executing R batch files

2009-02-03 Thread joseph . g . boyer
Thank you, I appreciate your reply. I have managed to get Shell("c:\TEMP\Rbatch.bat") to work. What solved the problem was saving the Rbatch.bat file as type "All files" as opposed to as a text file. Why that worked, I have no idea. Joe Boyer Statistical Sciences Renaissance Bldg 510, 3233-D

[R] executing R batch files

2009-02-02 Thread joseph . g . boyer
The following command, issued from the DOS command prompt (running Windows XP), produces the intended result of a .csv file created by program.R: ?c:\program files\R\R-2.8.0\bin\Rterm.exe? --save < "c:\TEMP\program.R" However, when I create a file called Rbatch.bat that contains exactly the lin

[R] referring to calls in functions

2009-01-13 Thread joseph . g . boyer
The first program generates an error message and does not execute the regression of y on x. x<-1:10; y<-rnorm(10) + x; prac <- function( model, wghts ){ lm(model, weights = wghts) } prac(model = y~x, wghts = rep(1, 10)) But the next program works: x<

Re: [R] understanding recursive functions

2008-12-20 Thread joseph . g . boyer
Jeffrey and Jeff, Thank you for clearing this up. The problem was that I didn't read page 47 of the guide carefully. The introduction of the <<- operator on page 44 leaves me with the impression that <<- will create an assignment in the local environment THAT ALSO holds true for the next higher

Re: [R] understanding lexical scope

2008-12-19 Thread joseph . g . boyer
Thomas, Jeff, Mark, Antonio, Thank you for your answers. They have helped me clarify how R functions work. They work differently from SAS functions (which SAS calls macros.) If you know SAS, consider the following code: * %macro q(y); data one; outvar = &y. + &x.; output; c

[R] understanding lexical scope

2008-12-18 Thread joseph . g . boyer
I am trying to understand the concept of lexical scope in "An Introduction to R" by the R Core development team. I'd appreciate it if someone would explain why the following example does not work: q <- function(y) {x + y}; w <- function(x){q(x)}; w(2); According to the discussion of Scope on p

[R] understanding recursive functions

2008-12-18 Thread joseph . g . boyer
I'm trying to understand the use of recursive functions described on page 45 of An Introduction to R by the R core development team. A function is a list of expressions, which all get executed with only the last being assigned to a global variable, right? So if a function refers recursively to