- 1. Re: moving median in S without looping (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Tue, 21 Jan 2003 11:56:04 -0500
- And to complete the bevy of options, here is my code (part of the R gregmisc package) for computing running values of arbitrary functions. It also works fine in S-Plus. -Greg -- start of code -- "run
- /archives/html/s-news/2003-01/msg00113.html (11,225 bytes)
- 2. Re: S and macros (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Tue, 8 Oct 2002 18:30:21 -0400
- -Greg LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorize
- /archives/html/s-news/2002-10/msg00075.html (9,502 bytes)
- 3. Re: Using tapply to avoid loop [was blank subject] (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Tue, 2 Apr 2002 15:21:47 -0500
- a=sample(1:3, 10, replace=T), b=rnorm(10 ) ) > data a b 1 1 -0.80358926 2 3 0.90264080 3 2 -1.15586985 4 3 0.10498028 5 3 0.23021549 6 3 2.39568112 7 2 0.08249998 8 1 -0.02488167 9 3 0.75256178 10 1
- /archives/html/s-news/2002-04/msg00017.html (11,977 bytes)
- 4. FW: apply function to mutliple columns (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Thu, 7 Feb 2002 10:24:20 -0500
- I don't think you can use the MARGIN argument directly to do what you want. I would approach the problem by creating a new data frame that 'stacks' the data from adjacent columns into a single column
- /archives/html/s-news/2002-02/msg00059.html (10,100 bytes)
- 5. Re: apply function to mutliple columns (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Thu, 7 Feb 2002 14:10:50 -0500
- To be clear, Gunter's code and my code accomplish two different things. I (mis?)read Bliese's question as 'How can I apply a function to the contents of two ajacent columns as a single _unit_?' and p
- /archives/html/s-news/2002-02/msg00073.html (14,254 bytes)
- 6. Re: Modify incrementation in a for loop - summary (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Fri, 8 Feb 2002 20:28:51 -0500
- If you want your for loop to increment by 2 rather than by 1, give it a vector that does this for( i in seq(1,20,by=2)) print(i) -GReg LEGAL NOTICE Unless expressly stated otherwise, this message is
- /archives/html/s-news/2002-02/msg00093.html (10,789 bytes)
- 7. Re: Summary: Splus vs. R & Linux vs. Windows (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Fri, 22 Feb 2002 17:43:48 -0500
- w
- /archives/html/s-news/2002-02/msg00205.html (12,941 bytes)
- 8. Re: adding quartiles (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Wed, 30 Jan 2002 22:41:09 -0500
- Alternatively, use cut() directly mydata <- data.frame(x=rnorm(100),y=rnorm(100)) mydata$x.quartile <- cut( mydata$x, quantile(mydata$x, c(0,0.25,0.5,0.75,1)), include.lowest=T) -Greg LEGAL NOTICE Un
- /archives/html/s-news/2002-01/msg00216.html (9,566 bytes)
- 9. Re: writing scripts in S-Plus 6 for Linux (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Mon, 3 Dec 2001 11:32:05 -0500
- Hi Winifred, I think your basic misunderstanding is that S-Plus scripts are stored as separate *files* rather than as S-plus *objects*. Thus the 'source()' command expects a *character*string* (or an
- /archives/html/s-news/2001-12/msg00017.html (14,636 bytes)
- 10. Re: Modifying lowess to yield quantiles (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Wed, 5 Dec 2001 14:00:37 -0500
- I've written a function 'wapply' that applies a specified function over local x-regions of a set of x,y points as part of the 'gregmisc' library that I provide for R (I would welcome help in making
- /archives/html/s-news/2001-12/msg00051.html (15,681 bytes)
- 11. Re: SQL in S-PLUS (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Fri, 7 Dec 2001 12:59:10 -0500
- This is the standar S approach: alcohol.type=c("wine","","beer","beer","wine","","","","beer","wine")) use.alcohol alcohol.type 1 TRUE wine 2 FALSE 3 TRUE beer 4 TRUE beer 5 TRUE wine 6 FALSE 7 FALSE
- /archives/html/s-news/2001-12/msg00074.html (10,034 bytes)
- 12. Re: sqpe documentation (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Wed, 14 Nov 2001 20:40:42 -0500
- FYI, ESS is an Emacs mode that does exactly this. See LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Acc
- /archives/html/s-news/2001-11/msg00124.html (10,735 bytes)
- 13. Re: From: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com> (score: 1)
- Author: "Warnes, Gregory R" <gregory_r_warnes@groton.pfizer.com>
- Date: Mon, 8 Oct 2001 11:28:43 -0400
- There are three basic methods of handling a varying number of arguments. Which is best depends on what you need to do. 1) give arguments default values: f <- function(x, y=NULL, z=NULL) { return( c(x
- /archives/html/s-news/2001-10/msg00061.html (9,538 bytes)
This search system is powered by
Namazu