r-gregmisc-users Mailing List for R gregmisc package (Page 37)
Brought to you by:
warnes
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(5) |
May
(3) |
Jun
(5) |
Jul
(2) |
Aug
(5) |
Sep
(7) |
Oct
(15) |
Nov
(34) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
(16) |
Mar
(28) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(9) |
Aug
(50) |
Sep
(29) |
Oct
(9) |
Nov
(25) |
Dec
(7) |
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(8) |
May
(26) |
Jun
(11) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
(26) |
Jun
|
Jul
(10) |
Aug
(6) |
Sep
|
Oct
(7) |
Nov
(3) |
Dec
(2) |
2010 |
Jan
(45) |
Feb
(11) |
Mar
|
Apr
(1) |
May
(8) |
Jun
(7) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(14) |
Sep
(29) |
Oct
(3) |
Nov
|
Dec
(3) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
(59) |
Jul
|
Aug
(8) |
Sep
(21) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
(10) |
Apr
|
May
(18) |
Jun
(25) |
Jul
(18) |
Aug
(1) |
Sep
(6) |
Oct
(28) |
Nov
(4) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(5) |
Mar
(4) |
Apr
(36) |
May
(3) |
Jun
(7) |
Jul
(46) |
Aug
(14) |
Sep
(12) |
Oct
(2) |
Nov
|
Dec
(12) |
2015 |
Jan
(4) |
Feb
|
Mar
|
Apr
(80) |
May
(36) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wa...@us...> - 2007-03-24 21:30:28
|
Revision: 1085 http://svn.sourceforge.net/r-gregmisc/?rev=1085&view=rev Author: warnes Date: 2007-03-24 14:30:26 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Update my email address Modified Paths: -------------- trunk/fork/DESCRIPTION trunk/fork/man/exit.Rd trunk/fork/man/fork.Rd trunk/fork/man/getpid.Rd trunk/fork/man/kill.Rd trunk/fork/man/signame.Rd Modified: trunk/fork/DESCRIPTION =================================================================== --- trunk/fork/DESCRIPTION 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/DESCRIPTION 2007-03-24 21:30:26 UTC (rev 1085) @@ -2,10 +2,13 @@ Title: R functions for handling multiple processes. Version: 1.2.0 Date: 2007-03-22 -Author: Gregory R. Warnes <wa...@bs...> +Author: Gregory R. Warnes <gr...@ra...>. Financial + support for some aspects of this package provided by Metrum Research Group, + LLC <http://www.metrumrg.com>. Description: These functions provides simple wrappers around the Unix process management API calls: fork, signal, wait, waitpid, kill, and _exit. This enables construction of programs that utilize and mange multiple concurrent - processes. -Maintainer: Gregory R. Warnes <wa...@bs...> + processes. Commercial support for this package available from + Random Technologies, LLC <http://www.random-technologies-llc.com> +Maintainer: Gregory R. Warnes <gr...@ra...> License: GPL Modified: trunk/fork/man/exit.Rd =================================================================== --- trunk/fork/man/exit.Rd 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/man/exit.Rd 2007-03-24 21:30:26 UTC (rev 1085) @@ -25,7 +25,7 @@ argument, so it is usually not necessary to directly call exit(). } \references{"\_exit" man page} -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{fork}}, \code{\link{getpid}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/fork.Rd =================================================================== --- trunk/fork/man/fork.Rd 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/man/fork.Rd 2007-03-24 21:30:26 UTC (rev 1085) @@ -88,7 +88,7 @@ function returns 0 to the child process. } \references{'fork' man page} -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/getpid.Rd =================================================================== --- trunk/fork/man/getpid.Rd 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/man/getpid.Rd 2007-03-24 21:30:26 UTC (rev 1085) @@ -15,7 +15,7 @@ Integer process id. } \references{Unix "getpid" man page} -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{fork}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/kill.Rd =================================================================== --- trunk/fork/man/kill.Rd 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/man/kill.Rd 2007-03-24 21:30:26 UTC (rev 1085) @@ -28,7 +28,7 @@ \code{killall} does not return a value. } \references{"kill" and "waitpid" man pages} -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/signame.Rd =================================================================== --- trunk/fork/man/signame.Rd 2007-03-24 21:27:27 UTC (rev 1084) +++ trunk/fork/man/signame.Rd 2007-03-24 21:30:26 UTC (rev 1085) @@ -29,7 +29,7 @@ \item{desc}{Description} } \references{Unix "signal" man page.} -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-24 21:28:24
|
Revision: 1084 http://svn.sourceforge.net/r-gregmisc/?rev=1084&view=rev Author: warnes Date: 2007-03-24 14:27:27 -0700 (Sat, 24 Mar 2007) Log Message: ----------- Add note of financial support from Metrum Modified Paths: -------------- trunk/fork/man/handleSIGCLD.Rd trunk/fork/man/signal.Rd Modified: trunk/fork/man/handleSIGCLD.Rd =================================================================== --- trunk/fork/man/handleSIGCLD.Rd 2007-03-23 22:53:00 UTC (rev 1083) +++ trunk/fork/man/handleSIGCLD.Rd 2007-03-24 21:27:27 UTC (rev 1084) @@ -30,7 +30,10 @@ } \references{W.R. Stevens and S.A. Rago, Advanced Programming in the UNIX environment, 2nd ed. (c) 2005, Pearson Education, pp 308-310.} -\author{Gregory R. Warnes \email{gre...@ro...} } +\author{Gregory R. Warnes \email{gr...@ra...}, + with financial support from Metrum Research Group, LLC + \url{http://www.metrumrg.com}. +} \seealso{ \code{\link{fork}}, \code{\link{wait}}, \code{\link{signal}} } \examples{ Modified: trunk/fork/man/signal.Rd =================================================================== --- trunk/fork/man/signal.Rd 2007-03-23 22:53:00 UTC (rev 1083) +++ trunk/fork/man/signal.Rd 2007-03-24 21:27:27 UTC (rev 1084) @@ -22,7 +22,10 @@ Nothing of interest. } \references{ See the unix man page for "signal" for more information} -\author{Gregory R. Warnes \email{gre...@ro...} } +\author{Gregory R. Warnes \email{gr...@ra...}, + with financial support from Metrum Research Group, LLC + \url{http://www.metrumrg.com}. +} \note{ Be very careful with this function. It can be used to totally confuse the R process. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-23 22:53:06
|
Revision: 1083 http://svn.sourceforge.net/r-gregmisc/?rev=1083&view=rev Author: warnes Date: 2007-03-23 15:53:00 -0700 (Fri, 23 Mar 2007) Log Message: ----------- Allow permutations for r>n provided repeats.allowed=TRUE Modified Paths: -------------- trunk/gtools/R/combinations.R Modified: trunk/gtools/R/combinations.R =================================================================== --- trunk/gtools/R/combinations.R 2007-03-22 17:12:16 UTC (rev 1082) +++ trunk/gtools/R/combinations.R 2007-03-23 22:53:00 UTC (rev 1083) @@ -62,8 +62,8 @@ || r < 1 || (r %% 1) != 0) stop("bad value of r") if(!is.atomic(v) || length(v) < n) stop("v is either non-atomic or too short") - if( (r > n) ) #& repeats.allowed==FALSE) - stop("r > n") # and repeats.allowed=FALSE") + if( (r > n) & repeats.allowed==FALSE) + stop("r > n and repeats.allowed=FALSE") if(set) { v <- unique(sort(v)) if (length(v) < n) stop("too few different elements") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-22 17:12:21
|
Revision: 1082 http://svn.sourceforge.net/r-gregmisc/?rev=1082&view=rev Author: warnes Date: 2007-03-22 10:12:16 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Add NEWS file Added Paths: ----------- trunk/fork/NEWS Added: trunk/fork/NEWS =================================================================== --- trunk/fork/NEWS (rev 0) +++ trunk/fork/NEWS 2007-03-22 17:12:16 UTC (rev 1082) @@ -0,0 +1,12 @@ + +Version: 1.2.0 - 2007-03-22 +=========================== + + - Added new function handleSIGCLD/restoreSIGCLD for setting + up/removing a SIGCLD handler so that fork'ed processes can safely be + ignored without becoming zombies. See ?handleSIGCLD for details. + + - Added regression tests for SysV and BSD style signal handling that + checks for zombie process creation & tests that signal("SIGCHLD","ignore") + and/or handleSIGCLD() prevents zombie process creation. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-22 17:12:07
|
Revision: 1081 http://svn.sourceforge.net/r-gregmisc/?rev=1081&view=rev Author: warnes Date: 2007-03-22 10:12:02 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Add date to DESCRIPTION file Modified Paths: -------------- trunk/fork/DESCRIPTION Modified: trunk/fork/DESCRIPTION =================================================================== --- trunk/fork/DESCRIPTION 2007-03-14 17:21:41 UTC (rev 1080) +++ trunk/fork/DESCRIPTION 2007-03-22 17:12:02 UTC (rev 1081) @@ -1,6 +1,7 @@ Package: fork Title: R functions for handling multiple processes. Version: 1.2.0 +Date: 2007-03-22 Author: Gregory R. Warnes <wa...@bs...> Description: These functions provides simple wrappers around the Unix process management API calls: fork, signal, wait, waitpid, kill, and _exit. This This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-14 17:21:43
|
Revision: 1080 http://svn.sourceforge.net/r-gregmisc/?rev=1080&view=rev Author: warnes Date: 2007-03-14 10:21:41 -0700 (Wed, 14 Mar 2007) Log Message: ----------- Add Barrets LOH data set Added Paths: ----------- trunk/RMCMC/data/ trunk/RMCMC/data/BarrettsLOH.txt trunk/RMCMC/data/loh.R Added: trunk/RMCMC/data/BarrettsLOH.txt =================================================================== --- trunk/RMCMC/data/BarrettsLOH.txt (rev 0) +++ trunk/RMCMC/data/BarrettsLOH.txt 2007-03-14 17:21:41 UTC (rev 1080) @@ -0,0 +1,41 @@ + loh n +1p 7 17 +1q 3 15 +2p 4 17 +2q 3 18 +3p 5 15 +3q 4 15 +4p 5 15 +4q 3 19 +5p 6 16 +5q 12 15 +6p 5 18 +6q 3 19 +7p 1 18 +7q 3 19 +8p 5 19 +8q 3 21 +9p 11 17 +9q 2 16 +10p 2 12 +10q 2 17 +11p 3 18 +11q 5 18 +12p 3 19 +12q 4 19 +13q 6 14 +14q 3 12 +15q 1 16 +16p 4 19 +16q 5 16 +17p 19 19 +17q 5 21 +18p 5 15 +18q 6 13 +19p 5 20 +19q 6 16 +20p 2 17 +20q 0 8 +21p 0 7 +21q 6 18 +22q 4 15 Property changes on: trunk/RMCMC/data/BarrettsLOH.txt ___________________________________________________________________ Name: svn:executable + * Added: trunk/RMCMC/data/loh.R =================================================================== --- trunk/RMCMC/data/loh.R (rev 0) +++ trunk/RMCMC/data/loh.R 2007-03-14 17:21:41 UTC (rev 1080) @@ -0,0 +1 @@ +loh <- read.table("BarrettsLOH.txt") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 22:35:14
|
Revision: 1079 http://svn.sourceforge.net/r-gregmisc/?rev=1079&view=rev Author: warnes Date: 2007-03-09 14:35:13 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Remove stray character Modified Paths: -------------- trunk/gmodels/R/ci.R Modified: trunk/gmodels/R/ci.R =================================================================== --- trunk/gmodels/R/ci.R 2007-03-09 20:10:58 UTC (rev 1078) +++ trunk/gmodels/R/ci.R 2007-03-09 22:35:13 UTC (rev 1079) @@ -49,7 +49,7 @@ "Std. Error"= coef(x)[,2], "p-value" = coef(x)[,4]) - reqtval + retval } ci.lme <- function(x,confidence=0.95,alpha=1-confidence,...) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 20:11:30
|
Revision: 1078 http://svn.sourceforge.net/r-gregmisc/?rev=1078&view=rev Author: warnes Date: 2007-03-09 12:10:58 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Update NEWS file. Modified Paths: -------------- trunk/gmodels/NEWS Modified: trunk/gmodels/NEWS =================================================================== --- trunk/gmodels/NEWS 2007-03-09 20:07:20 UTC (rev 1077) +++ trunk/gmodels/NEWS 2007-03-09 20:10:58 UTC (rev 1078) @@ -1,3 +1,14 @@ +Version 2.13.2 +-------------- + +Bug Fixes: + +- Lower and upper end of confidence interval for lmer objects were + reversed in est.lmer(). + +- Correct Greg's email address in two help files. + + Version 2.13.1 -------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 20:07:43
|
Revision: 1077 http://svn.sourceforge.net/r-gregmisc/?rev=1077&view=rev Author: warnes Date: 2007-03-09 12:07:20 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Update version number Modified Paths: -------------- trunk/gmodels/DESCRIPTION Modified: trunk/gmodels/DESCRIPTION =================================================================== --- trunk/gmodels/DESCRIPTION 2007-03-09 20:06:36 UTC (rev 1076) +++ trunk/gmodels/DESCRIPTION 2007-03-09 20:07:20 UTC (rev 1077) @@ -1,5 +1,5 @@ Package: gmodels -Version: 2.13.1 +Version: 2.13.2 Title: Various R programming tools for model fitting Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker, Thomas Lumley, and Randall C Johnson. @@ -16,3 +16,4 @@ URL: http://cran.r-project.org/src/contrib/PACKAGES.html http://www.sf.net/projects/r-gregmisc Packaged: Mon Jun 5 16:19:14 2006; root +Date: 2007-03-09 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 20:07:05
|
Revision: 1076 http://svn.sourceforge.net/r-gregmisc/?rev=1076&view=rev Author: warnes Date: 2007-03-09 12:06:36 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Minor code formatting changes Modified Paths: -------------- trunk/gmodels/R/ci.R Modified: trunk/gmodels/R/ci.R =================================================================== --- trunk/gmodels/R/ci.R 2007-03-09 20:06:05 UTC (rev 1075) +++ trunk/gmodels/R/ci.R 2007-03-09 20:06:36 UTC (rev 1076) @@ -3,21 +3,22 @@ ci <- function(x, confidence=0.95,alpha=1-confidence,...) UseMethod("ci") -ci.default <- function(x, confidence=0.95,alpha=1-confidence,na.rm=FALSE,...) { - est <- mean(x, na.rm=na.rm) - stderr <- sd(x, na.rm=na.rm)/sqrt(nobs(x)); - ci.low <- est + qt(alpha/2, nobs(x)-1) * stderr - ci.high <- est - qt(alpha/2, nobs(x)-1) * stderr - retval <- c( - Estimate=est, - "CI lower"=ci.low, - "CI upper"=ci.high, - "Std. Error"=stderr - ) +ci.default <- function(x, confidence=0.95,alpha=1-confidence,na.rm=FALSE,...) + { + est <- mean(x, na.rm=na.rm) + stderr <- sd(x, na.rm=na.rm)/sqrt(nobs(x)); + ci.low <- est + qt(alpha/2, nobs(x)-1) * stderr + ci.high <- est - qt(alpha/2, nobs(x)-1) * stderr + retval <- c( + Estimate=est, + "CI lower"=ci.low, + "CI upper"=ci.high, + "Std. Error"=stderr + ) + + retval + } - retval -} - ci.binom <- function(x, confidence=0.95,alpha=1-confidence,...) { if( !(all(x) %in% c(0,1)) ) stop("Binomial values must be either 0 or 1.") @@ -37,48 +38,55 @@ } ci.lm <- function(x,confidence=0.95,alpha=1-confidence,...) -{ - x <- summary(x) - est <- coef(x)[,1] ; - ci.low <- est + qt(alpha/2, x$df[2]) * coef(x)[,2] ; - ci.high <- est - qt(alpha/2, x$df[2]) * coef(x)[,2] ; - retval <- cbind(Estimate=est, - "CI lower"=ci.low, - "CI upper"=ci.high, - "Std. Error"= coef(x)[,2], - "p-value" = coef(x)[,4]) + { + x <- summary(x) + est <- coef(x)[,1] ; + ci.low <- est + qt(alpha/2, x$df[2]) * coef(x)[,2] ; + ci.high <- est - qt(alpha/2, x$df[2]) * coef(x)[,2] ; + retval <- cbind(Estimate=est, + "CI lower"=ci.low, + "CI upper"=ci.high, + "Std. Error"= coef(x)[,2], + "p-value" = coef(x)[,4]) + + reqtval + } - retval -} - ci.lme <- function(x,confidence=0.95,alpha=1-confidence,...) { - x <- summary(x) - est <- x$tTable[,"Value"] ; - ci.low <- est + qt(alpha/2, x$tTable[,"DF"]) * x$tTable[,"Std.Error"] ; - ci.high <- est - qt(alpha/2, x$tTable[,"DF"]) * x$tTable[,"Std.Error"] ; - retval <- cbind(Estimate=est, - "CI lower"=ci.low, - "CI upper"=ci.high, - "Std. Error"= x$tTable[,"Std.Error"], - "DF" = x$tTable[,"DF"], - "p-value" = x$tTable[,"p-value"]) - rownames(retval) <- rownames(x$tTable) - retval -} + x <- summary(x) + est <- x$tTable[,"Value"] ; + ci.low <- est + qt(alpha/2, x$tTable[,"DF"]) * x$tTable[,"Std.Error"] ; + ci.high <- est - qt(alpha/2, x$tTable[,"DF"]) * x$tTable[,"Std.Error"] ; + retval <- cbind(Estimate=est, + "CI lower"=ci.low, + "CI upper"=ci.high, + "Std. Error"= x$tTable[,"Std.Error"], + "DF" = x$tTable[,"DF"], + "p-value" = x$tTable[,"p-value"]) + rownames(retval) <- rownames(x$tTable) + retval + } -ci.lmer <- function(x, confidence=0.95, alpha=1-confidence, sim.lmer=TRUE, n.sim=1000, ...) ################### changed this function +ci.lmer <- function(x, + confidence=0.95, + alpha=1-confidence, + sim.lmer=TRUE, + n.sim=1000, + ... + ) { if(!(require(coda, quietly=TRUE) & require(Matrix, quietly=TRUE))) stop("coda and Matrix packages required for ci.lmer") x.effects <- fixef(x) n <- length(x.effects) - + retval <- est.lmer(obj = x, cm = diag(n), beta0 = rep(0, n), conf.int = confidence, show.beta0 = FALSE, - n.sim = n.sim)[,c("Estimate", "Lower.CI", "Upper.CI", "Std. Error", "p value")] - + n.sim = n.sim)[,c("Estimate", "Lower.CI", "Upper.CI", + "Std. Error", "p value")] + colnames(retval)[c(2:3, 5)] <- c("CI lower", "CI upper", "p-value") rownames(retval) <- names(x.effects) retval This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 20:06:36
|
Revision: 1075 http://svn.sourceforge.net/r-gregmisc/?rev=1075&view=rev Author: warnes Date: 2007-03-09 12:06:05 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Flip lower and upper interval in ci.lmer(). Add example to man page. Modified Paths: -------------- trunk/gmodels/R/est.lmer.R trunk/gmodels/man/ci.Rd Modified: trunk/gmodels/R/est.lmer.R =================================================================== --- trunk/gmodels/R/est.lmer.R 2007-03-09 19:43:05 UTC (rev 1074) +++ trunk/gmodels/R/est.lmer.R 2007-03-09 20:06:05 UTC (rev 1075) @@ -24,7 +24,8 @@ est <- drop(cm %*% samp.summ$statistics[1:n,1]) stderr <- sd(samp.cm) - pval <- sapply(1:length(beta0), function(i){percentile(beta0[i], samp.cm[,i])}) + pval <- sapply(1:length(beta0), + function(i){percentile(beta0[i], samp.cm[,i])}) pval <- ifelse(pval <= .5, 2*pval, 2*(1-pval)) if(is.null(conf.int)) @@ -33,10 +34,15 @@ upper.ci <- NULL }else{ alpha <- 1-conf.int - samp.ci <- sapply(1:length(beta0), function(i){quantile(samp.cm[,i], probs=c(alpha/2, 1-alpha/2))}) + samp.ci <- sapply(1:length(beta0), + function(i) + { + quantile(samp.cm[,i], probs=c(alpha/2, 1-alpha/2)) + } + ) - lower.ci <- samp.ci[2,] - upper.ci <- samp.ci[1,] + lower.ci <- samp.ci[1,] + upper.ci <- samp.ci[2,] } # return results Modified: trunk/gmodels/man/ci.Rd =================================================================== --- trunk/gmodels/man/ci.Rd 2007-03-09 19:43:05 UTC (rev 1074) +++ trunk/gmodels/man/ci.Rd 2007-03-09 20:06:05 UTC (rev 1075) @@ -66,5 +66,13 @@ reg <- lm(Area ~ Population, data=as.data.frame(state.x77)) ci(reg) +\dontrun{ +# lmer example +library(lme4) +fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy) +ci(fm2) } + + +} \keyword{ regression } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-09 19:43:58
|
Revision: 1074 http://svn.sourceforge.net/r-gregmisc/?rev=1074&view=rev Author: warnes Date: 2007-03-09 11:43:05 -0800 (Fri, 09 Mar 2007) Log Message: ----------- Fix some old email addressses that got missed Modified Paths: -------------- trunk/gmodels/man/ci.Rd trunk/gmodels/man/estimable.Rd Modified: trunk/gmodels/man/ci.Rd =================================================================== --- trunk/gmodels/man/ci.Rd 2007-03-09 09:05:00 UTC (rev 1073) +++ trunk/gmodels/man/ci.Rd 2007-03-09 19:43:05 UTC (rev 1074) @@ -42,7 +42,7 @@ \code{Estimate}, \code{CI lower}, \code{CI upper}, \code{Std. Error}, \code{DF} (for lme objects only), and \code{p-value}. } -\author{ Gregory R. Warnes \email{Gregory\_R\_Warnes\@groton.pfizer.com} +\author{ Gregory R. Warnes \email{wa...@bs...} } \seealso{ \code{\link[stats]{confint}}, Modified: trunk/gmodels/man/estimable.Rd =================================================================== --- trunk/gmodels/man/estimable.Rd 2007-03-09 09:05:00 UTC (rev 1073) +++ trunk/gmodels/man/estimable.Rd 2007-03-09 19:43:05 UTC (rev 1074) @@ -93,7 +93,7 @@ } \author{ BXC (Bendix Carstensen) \email{bxc\@novonordisk.com}, - Gregory R. Warnes \email{Gregory\_R\_Warnes\@groton.pfizer.com}, + Gregory R. Warnes \email{wa...@bs...}, S\xF8ren H\xF8jsgaard \email{so...@ag...}, and Randall C Johnson \email{rjo...@nc...} } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2007-03-09 09:05:02
|
Revision: 1073 http://svn.sourceforge.net/r-gregmisc/?rev=1073&view=rev Author: ggorjan Date: 2007-03-09 01:05:00 -0800 (Fri, 09 Mar 2007) Log Message: ----------- use of \method in Rd markup - issues a warning with _R_CHECK_RD_STYLE_=TRUE env. variable with R 2.5.0 Modified Paths: -------------- trunk/gplots/man/ooplot.Rd Modified: trunk/gplots/man/ooplot.Rd =================================================================== --- trunk/gplots/man/ooplot.Rd 2007-03-06 23:37:37 UTC (rev 1072) +++ trunk/gplots/man/ooplot.Rd 2007-03-09 09:05:00 UTC (rev 1073) @@ -9,7 +9,7 @@ } \usage{ ooplot(data, ...) -ooplot.default(data, width=1, space=NULL, names.arg=NULL, +\method{ooplot}{default}(data, width=1, space=NULL, names.arg=NULL, legend.text=NULL, horiz=FALSE, density=NULL, angle=45, kmg="fpnumkMGTP", kmglim=TRUE, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:37:39
|
Revision: 1072 http://svn.sourceforge.net/r-gregmisc/?rev=1072&view=rev Author: warnes Date: 2007-03-06 15:37:37 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Update version number and description Modified Paths: -------------- trunk/fork/DESCRIPTION Modified: trunk/fork/DESCRIPTION =================================================================== --- trunk/fork/DESCRIPTION 2007-03-06 23:29:46 UTC (rev 1071) +++ trunk/fork/DESCRIPTION 2007-03-06 23:37:37 UTC (rev 1072) @@ -1,10 +1,10 @@ Package: fork Title: R functions for handling multiple processes. -Version: 1.1.1 +Version: 1.2.0 Author: Gregory R. Warnes <wa...@bs...> Description: These functions provides simple wrappers around the Unix process - management API calls: fork, wait, waitpid, kill, and _exit. This - enables construction of programs that utilize multiple concurrent + management API calls: fork, signal, wait, waitpid, kill, and _exit. This + enables construction of programs that utilize and mange multiple concurrent processes. Maintainer: Gregory R. Warnes <wa...@bs...> License: GPL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:29:47
|
Revision: 1071 http://svn.sourceforge.net/r-gregmisc/?rev=1071&view=rev Author: warnes Date: 2007-03-06 15:29:46 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Fix syntax error in example due to incomplete code deletion. Modified Paths: -------------- trunk/fork/man/handleSIGCLD.Rd Modified: trunk/fork/man/handleSIGCLD.Rd =================================================================== --- trunk/fork/man/handleSIGCLD.Rd 2007-03-06 23:29:12 UTC (rev 1070) +++ trunk/fork/man/handleSIGCLD.Rd 2007-03-06 23:29:46 UTC (rev 1071) @@ -46,8 +46,6 @@ ## don't do anything useful exit() } - else - pidList[i] <- pid } ## remove the dummy signal handler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:29:17
|
Revision: 1070 http://svn.sourceforge.net/r-gregmisc/?rev=1070&view=rev Author: warnes Date: 2007-03-06 15:29:12 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Add 'PACKAGE=' argument to '.C' calls to make 'R CMD check' happy Modified Paths: -------------- trunk/fork/R/handleSIGCLD.R trunk/fork/R/restoreSIGCLD.R Modified: trunk/fork/R/handleSIGCLD.R =================================================================== --- trunk/fork/R/handleSIGCLD.R 2007-03-06 23:28:27 UTC (rev 1069) +++ trunk/fork/R/handleSIGCLD.R 2007-03-06 23:29:12 UTC (rev 1070) @@ -5,6 +5,6 @@ handleSIGCLD <- function() { - .C("R_install_sigcld_handler") + .C("R_install_sigcld_handler", PACKAGE="fork") invisible(NULL) } Modified: trunk/fork/R/restoreSIGCLD.R =================================================================== --- trunk/fork/R/restoreSIGCLD.R 2007-03-06 23:28:27 UTC (rev 1069) +++ trunk/fork/R/restoreSIGCLD.R 2007-03-06 23:29:12 UTC (rev 1070) @@ -1,6 +1,6 @@ # Restore the original SIGCLD hander. This reverses the action of 'handleSIGCLD'. restoreSIGCLD <- function() { - .C("R_restore_sigcld_handler") + .C("R_restore_sigcld_handler", PACKAGE="fork") invisible(NULL) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:28:29
|
Revision: 1069 http://svn.sourceforge.net/r-gregmisc/?rev=1069&view=rev Author: warnes Date: 2007-03-06 15:28:27 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Improve regression tests, add saved .Rout files for doing regression testing. Modified Paths: -------------- trunk/fork/tests/checkZombies.R trunk/fork/tests/test_many_fork_BSD.R trunk/fork/tests/test_many_fork_SysV.R trunk/fork/tests/test_many_fork_broken.R Added Paths: ----------- trunk/fork/tests/test_many_fork_BSD.Rout.save trunk/fork/tests/test_many_fork_SysV.Rout.save trunk/fork/tests/test_many_fork_broken.Rout.save Modified: trunk/fork/tests/checkZombies.R =================================================================== --- trunk/fork/tests/checkZombies.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/checkZombies.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -32,6 +32,7 @@ if(length(zombies)>50) { retval = TRUE + warning(length(zombies), " Zombie Processes Present!\n") cat(length(zombies), " Zombie Processes Present!\n") } else Modified: trunk/fork/tests/test_many_fork_BSD.R =================================================================== --- trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -12,11 +12,5 @@ nZombies <- checkZombies() -if(nZombies) { - stop("Zombie processes created") -} else { - cat("Success!\n") -} - # remove signal handler restoreSIGCLD() Added: trunk/fork/tests/test_many_fork_BSD.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_BSD.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_BSD.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,40 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, and sets up a 'dummy' SIGCLD +> ## hander to handle child process notifications. Hopefully on both BSD +> ## and Sys5 derived systems, this should cause child processes to exit +> ## and die cleanly, IE without becoming zombies. +> +> library(fork) +> +> ## start signal handler +> handleSIGCLD() +Installing SIGCHLD signal handler...Done. +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +Done. No Zombies present. +> +> # remove signal handler +> restoreSIGCLD() +Restoring original SIGCHLD signal handler...Done. +> Modified: trunk/fork/tests/test_many_fork_SysV.R =================================================================== --- trunk/fork/tests/test_many_fork_SysV.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_SysV.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -12,8 +12,3 @@ nZombies <- checkZombies() -if(nZombies) - stop("Zombie processes created") -else - cat("Success!\n") - Added: trunk/fork/tests/test_many_fork_SysV.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_SysV.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_SysV.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,36 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, and sets the SIGCHLD hander to +> ## "ignore". On Sys5 derived systems, this should cause child +> ## processes to exit and die cleanly without the parent process +> ## querying the exit state. IE, no zombie processes will be created. +> +> library(fork) +> +> ## ignore sigchld signals so child processes will die cleanly +> signal("SIGCHLD","ignore") +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +Done. No Zombies present. +> +> Modified: trunk/fork/tests/test_many_fork_broken.R =================================================================== --- trunk/fork/tests/test_many_fork_broken.R 2007-03-06 23:17:34 UTC (rev 1068) +++ trunk/fork/tests/test_many_fork_broken.R 2007-03-06 23:28:27 UTC (rev 1069) @@ -8,7 +8,3 @@ nZombies <- checkZombies() -if(nZombies) - stop("Zombie processes created") -else - cat("Success!\n") Added: trunk/fork/tests/test_many_fork_broken.Rout.save =================================================================== --- trunk/fork/tests/test_many_fork_broken.Rout.save (rev 0) +++ trunk/fork/tests/test_many_fork_broken.Rout.save 2007-03-06 23:28:27 UTC (rev 1069) @@ -0,0 +1,35 @@ + +R version 2.4.1 (2006-12-18) +Copyright (C) 2006 The R Foundation for Statistical Computing +ISBN 3-900051-07-0 + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> ## This script starts child processes, but doesn't do anything about +> ## collecting or ignoring child process return status. Consequently, it should +> ## generate zombie child processes. +> +> library(fork) +> +> source("checkZombies.R") +> +> nZombies <- checkZombies() +Generating 100 child processes (to become zombies)... +Give them 10 seconds to die and exit.. +Check the process table to see if there are any zombies... +100 Zombie Processes Present! +Warning message: +100 Zombie Processes Present! + in: checkZombies() +> +> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:17:35
|
Revision: 1068 http://svn.sourceforge.net/r-gregmisc/?rev=1068&view=rev Author: warnes Date: 2007-03-06 15:17:34 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Add a helpful comment Modified Paths: -------------- trunk/fork/src/sigchld_handler.c Modified: trunk/fork/src/sigchld_handler.c =================================================================== --- trunk/fork/src/sigchld_handler.c 2007-03-06 23:15:31 UTC (rev 1067) +++ trunk/fork/src/sigchld_handler.c 2007-03-06 23:17:34 UTC (rev 1068) @@ -20,6 +20,7 @@ void sigchld_handler(int dummy) { int st; + // wait3 returns 0 when no signal is present to retrieve while (wait3(&st, WNOHANG, NULL) > 0); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 23:15:33
|
Revision: 1067 http://svn.sourceforge.net/r-gregmisc/?rev=1067&view=rev Author: warnes Date: 2007-03-06 15:15:31 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Create manual pages for handleSIGCLD() and restoreSIGCLD(), as well as appropriately modifying the pages for fork() and signal() Modified Paths: -------------- trunk/fork/man/fork.Rd trunk/fork/man/signal.Rd Added Paths: ----------- trunk/fork/man/handleSIGCLD.Rd Modified: trunk/fork/man/fork.Rd =================================================================== --- trunk/fork/man/fork.Rd 2007-03-06 22:47:29 UTC (rev 1066) +++ trunk/fork/man/fork.Rd 2007-03-06 23:15:31 UTC (rev 1067) @@ -162,12 +162,11 @@ close(con2) } -\dontrun{ -# Important: if we aren't going to explicitly wait() for the child -# process to exit, we need to tell the OS that we are ignoring child -# process signals so it will let us die cleanly. -signal("SIGCHLD","ignore") -} +## Important: if we aren't going to explicitly wait() for the child +## process to exit, we need to set up a dummy signal handler to collect +## (and then throw away) the exit status so that child processes will not +## become zombies when they exit +handleSIGCLD() # fork off the process pid <- fork(recieve) @@ -175,6 +174,9 @@ # start sending... send() } + +## restore SIGCLD signal handling to the previous state +restoreSIGCLD() } \keyword{programming} Added: trunk/fork/man/handleSIGCLD.Rd =================================================================== --- trunk/fork/man/handleSIGCLD.Rd (rev 0) +++ trunk/fork/man/handleSIGCLD.Rd 2007-03-06 23:15:31 UTC (rev 1067) @@ -0,0 +1,57 @@ +\name{handleSIGCLD} +\alias{handleSIGCLD} +\alias{restoreSIGCLD} +\title{Establish or remove a dummy handler for SIGCLD signals} +\description{ + Establish \code{handleSIGCLD} or remove \code{ignoreSIGCLD} a dummy + handler for SIGCLD signals +} +\usage{ +handleSIGCLD() +restoreSIGCLD() +} +\details{ + The \code{handleSIGCLD} function establishes a 'dummy' handler for + SIGCLD signals. It accepts signals from exiting child processes + created by \code{fork} and ignores them. This prevents child + processes from becoming 'zombies', which would occurs when the parent + process does not handle this signal. + + The \code{restoreSIGCLD} function restores the previous (lack of) + signal handler. +} +\value{ + No return value. +} +\note{ + The SIGCLD handling mechanism implemented by \code{handleSIGCLD} + should prevent zombie process creation on systems derived from both + SYSV and BSD UNIX, including Linux, Mac OSX, NetBSD, and Solaris. + } +\references{W.R. Stevens and S.A. Rago, Advanced Programming in the UNIX + environment, 2nd ed. (c) 2005, Pearson Education, pp 308-310.} +\author{Gregory R. Warnes \email{gre...@ro...} } +\seealso{ \code{\link{fork}}, \code{\link{wait}}, \code{\link{signal}} } +\examples{ + +## set up the dummy signal hander +handleSIGCLD() + +## Generate 100 child processes +for(i in 1:100) + { + pid = fork(slave=NULL) + if(pid==0) + { + ## don't do anything useful + exit() + } + else + pidList[i] <- pid + } + +## remove the dummy signal handler +restoreSIGCLD() +} +\keyword{programming} + Modified: trunk/fork/man/signal.Rd =================================================================== --- trunk/fork/man/signal.Rd 2007-03-06 22:47:29 UTC (rev 1066) +++ trunk/fork/man/signal.Rd 2007-03-06 23:15:31 UTC (rev 1067) @@ -26,11 +26,23 @@ \note{ Be very careful with this function. It can be used to totally confuse the R process. + + On sytems derived from BSD UNIX, setting the SIGCHLD signal to + 'ignore' will allow child processes to exit cleanly without becoming + zombies. This also prevents the parent process from checking the exit + status of children, since this information is no longer available once + child process disappears. On systems derived from SysV UNIX, setting + SIGCHLD to 'ignore' has no effect on the status of child processes + that exit, and they will still become zombies unless the exit status + is checked. See the \code{handleSIGCLD} function for a mechanism that + will prevent child processes from becoming zombies on both SYSV and + (hopefully) BSD-derived systems. } -\seealso{ \code{\link{sigval}}, \code{\link{fork}} } +\seealso{ \code{\link{sigval}}, \code{\link{fork}}, \code{\link{handleSIGCLD}} } \examples{ \dontrun{ -# Ignore child termination signals for forked processes +## Ignore child termination signals for forked processes NOTE: This +## mechanism only works on UNIX SYSV-derived systems. See Note above. signal("SIGCHLD","ignore") # Fork off a child process to say "Hi!". This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 22:48:42
|
Revision: 1066 http://svn.sourceforge.net/r-gregmisc/?rev=1066&view=rev Author: warnes Date: 2007-03-06 14:47:29 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Create SysV and BSD tests for code to prevent zombie process creation, update code that intentionally creates zombies. Move sub-process creation and zombie test code to a function for use by all three test files Added Paths: ----------- trunk/fork/tests/test_many_fork_BSD.R Added: trunk/fork/tests/test_many_fork_BSD.R =================================================================== --- trunk/fork/tests/test_many_fork_BSD.R (rev 0) +++ trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 22:47:29 UTC (rev 1066) @@ -0,0 +1,22 @@ +## This script starts child processes, and sets up a 'dummy' SIGCLD +## hander to handle child process notifications. Hopefully on both BSD +## and Sys5 derived systems, this should cause child processes to exit +## and die cleanly, IE without becoming zombies. + +library(fork) + +## start signal handler +handleSIGCLD() + +source("checkZombies.R") + +nZombies <- checkZombies() + +if(nZombies) { + stop("Zombie processes created") +} else { + cat("Success!\n") +} + +# remove signal handler +restoreSIGCLD() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 22:48:36
|
Revision: 1065 http://svn.sourceforge.net/r-gregmisc/?rev=1065&view=rev Author: warnes Date: 2007-03-06 14:47:07 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Create SysV and BSD tests for code to prevent zombie process creation, update code that intentionally creates zombies. Move sub-process creation and zombie test code to a function for use by all three test files Modified Paths: -------------- trunk/fork/tests/test_many_fork_broken.R Added Paths: ----------- trunk/fork/tests/checkZombies.R trunk/fork/tests/test_many_fork_SysV.R Removed Paths: ------------- trunk/fork/tests/test_many_fork.R Added: trunk/fork/tests/checkZombies.R =================================================================== --- trunk/fork/tests/checkZombies.R (rev 0) +++ trunk/fork/tests/checkZombies.R 2007-03-06 22:47:07 UTC (rev 1065) @@ -0,0 +1,48 @@ +checkZombies <- function() + { + cat("Generating 100 child processes (to become zombies)...\n") + pidList <- integer(100) + for(i in 1:100) + { + pid = fork(slave=NULL) + if(pid==0) + { + ##cat("Hi from child process",getpid(),".\n"); + ##Sys.sleep(10); + ##cat("Bye from child process",getpid(),".\n"); + exit() + } + else + pidList[i] <- pid + } + + cat("Give them 10 seconds to die and exit..\n") + Sys.sleep(10) + + cat("Check the process table to see if there are any zombies...\n") + if(TRUE) # BSD-style 'ps' command (Linux, Mac OSX, NetBSD) + { + statusList = system("ps -o stat", intern=TRUE)[-1] + } else # SysV-style 'ps' command (Solaris) + { + statusList = system("ps -o s", intern=TRUE)[-1] + } + + zombies = grep("[Zz]", statusList, value=TRUE) + if(length(zombies)>50) + { + retval = TRUE + cat(length(zombies), " Zombie Processes Present!\n") + } + else + { + retval = FALSE + cat("Done. No Zombies present.\n") + } + + + for(i in 1:100) + wait(pidList[i], nohang=FALSE) + + return(retval) +} Deleted: trunk/fork/tests/test_many_fork.R =================================================================== --- trunk/fork/tests/test_many_fork.R 2007-03-06 22:44:25 UTC (rev 1064) +++ trunk/fork/tests/test_many_fork.R 2007-03-06 22:47:07 UTC (rev 1065) @@ -1,27 +0,0 @@ -library(fork) - -# ignore sigchld signals so child processes will die cleanly -#signal("SIGCHLD","ignore") - -# start signal handler -.C("R_install_sigcld_handler") - -cat("Hi from the parent process\n"); - -for(i in 1:100) - { - pid = fork(slave=NULL) - if(pid==0) - { - cat("Hi from child process",getpid(),".\n"); - Sys.sleep(10); - cat("Bye from child process",getpid(),".\n"); - exit() - } - } - -Sys.sleep(300) -cat("Bye from the parent process",pid,".\n"); - -# remove signal handler -.C("R_restore_sigcld_handler") Added: trunk/fork/tests/test_many_fork_SysV.R =================================================================== --- trunk/fork/tests/test_many_fork_SysV.R (rev 0) +++ trunk/fork/tests/test_many_fork_SysV.R 2007-03-06 22:47:07 UTC (rev 1065) @@ -0,0 +1,19 @@ +## This script starts child processes, and sets the SIGCHLD hander to +## "ignore". On Sys5 derived systems, this should cause child +## processes to exit and die cleanly without the parent process +## querying the exit state. IE, no zombie processes will be created. + +library(fork) + +## ignore sigchld signals so child processes will die cleanly +signal("SIGCHLD","ignore") + +source("checkZombies.R") + +nZombies <- checkZombies() + +if(nZombies) + stop("Zombie processes created") +else + cat("Success!\n") + Modified: trunk/fork/tests/test_many_fork_broken.R =================================================================== --- trunk/fork/tests/test_many_fork_broken.R 2007-03-06 22:44:25 UTC (rev 1064) +++ trunk/fork/tests/test_many_fork_broken.R 2007-03-06 22:47:07 UTC (rev 1065) @@ -4,33 +4,11 @@ library(fork) -cat("Generating 100 child processes (to become zombies)...\n") -for(i in 1:100) - { - pid = fork(slave=NULL) - if(pid==0) - { - #cat("Hi from child process",getpid(),".\n"); - #Sys.sleep(10); - #cat("Bye from child process",getpid(),".\n"); - exit() - } - } +source("checkZombies.R") -cat("Give them 10 seconds to die and exit..\n") -Sys.sleep(10) +nZombies <- checkZombies() -cat("Check the process table to see if there are any zombies...\n") -if(TRUE) # BSD-style PS command (Linux, Mac OSX, NetBSD) -{ - statusList = system("ps -o stat", intern=TRUE)[-1] -} else -{ - statusList = system("ps -o s", intern=TRUE)[-1] -} - -zombies = grep("[Zz]", statusList, value=TRUE) -if(length(zombies)>50) - stop(length(zombies), " Zombie Processes Present!") +if(nZombies) + stop("Zombie processes created") else - cat("Done. No Zombies present.\n") + cat("Success!\n") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 22:44:27
|
Revision: 1064 http://svn.sourceforge.net/r-gregmisc/?rev=1064&view=rev Author: warnes Date: 2007-03-06 14:44:25 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Add wrappers for C functions to control setting/restoring child process signal handler. Added Paths: ----------- trunk/fork/R/handleSIGCLD.R trunk/fork/R/restoreSIGCLD.R Added: trunk/fork/R/handleSIGCLD.R =================================================================== --- trunk/fork/R/handleSIGCLD.R (rev 0) +++ trunk/fork/R/handleSIGCLD.R 2007-03-06 22:44:25 UTC (rev 1064) @@ -0,0 +1,10 @@ +# setup a a 'dummy' SIGCLD hander to handle child process +# notifications. Hopefully on both BSD and Sys5 derived systems, this +# should cause child processes to exit and die cleanly, IE without +# becoming zombies. + +handleSIGCLD <- function() + { + .C("R_install_sigcld_handler") + invisible(NULL) + } Added: trunk/fork/R/restoreSIGCLD.R =================================================================== --- trunk/fork/R/restoreSIGCLD.R (rev 0) +++ trunk/fork/R/restoreSIGCLD.R 2007-03-06 22:44:25 UTC (rev 1064) @@ -0,0 +1,6 @@ +# Restore the original SIGCLD hander. This reverses the action of 'handleSIGCLD'. +restoreSIGCLD <- function() + { + .C("R_restore_sigcld_handler") + invisible(NULL) + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 22:11:06
|
Revision: 1063 http://svn.sourceforge.net/r-gregmisc/?rev=1063&view=rev Author: warnes Date: 2007-03-06 14:10:24 -0800 (Tue, 06 Mar 2007) Log Message: ----------- Modify script to check for the presence of zombie processes Added Paths: ----------- trunk/fork/tests/test_many_fork_broken.R Added: trunk/fork/tests/test_many_fork_broken.R =================================================================== --- trunk/fork/tests/test_many_fork_broken.R (rev 0) +++ trunk/fork/tests/test_many_fork_broken.R 2007-03-06 22:10:24 UTC (rev 1063) @@ -0,0 +1,36 @@ +## This script starts child processes, but doesn't do anything about +## collecting or ignoring child process return status. Consequently, it should +## generate zombie child processes. + +library(fork) + +cat("Generating 100 child processes (to become zombies)...\n") +for(i in 1:100) + { + pid = fork(slave=NULL) + if(pid==0) + { + #cat("Hi from child process",getpid(),".\n"); + #Sys.sleep(10); + #cat("Bye from child process",getpid(),".\n"); + exit() + } + } + +cat("Give them 10 seconds to die and exit..\n") +Sys.sleep(10) + +cat("Check the process table to see if there are any zombies...\n") +if(TRUE) # BSD-style PS command (Linux, Mac OSX, NetBSD) +{ + statusList = system("ps -o stat", intern=TRUE)[-1] +} else +{ + statusList = system("ps -o s", intern=TRUE)[-1] +} + +zombies = grep("[Zz]", statusList, value=TRUE) +if(length(zombies)>50) + stop(length(zombies), " Zombie Processes Present!") +else + cat("Done. No Zombies present.\n") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-06 21:01:39
|
Revision: 1062 http://svn.sourceforge.net/r-gregmisc/?rev=1062&view=rev Author: warnes Date: 2007-03-06 13:01:38 -0800 (Tue, 06 Mar 2007) Log Message: ----------- This is a test commit. Modified Paths: -------------- trunk/fork/DESCRIPTION Modified: trunk/fork/DESCRIPTION =================================================================== --- trunk/fork/DESCRIPTION 2007-03-01 22:43:18 UTC (rev 1061) +++ trunk/fork/DESCRIPTION 2007-03-06 21:01:38 UTC (rev 1062) @@ -1,6 +1,6 @@ Package: fork Title: R functions for handling multiple processes. -Version: 1.1.0 +Version: 1.1.1 Author: Gregory R. Warnes <wa...@bs...> Description: These functions provides simple wrappers around the Unix process management API calls: fork, wait, waitpid, kill, and _exit. This This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2007-03-01 22:43:20
|
Revision: 1061 http://svn.sourceforge.net/r-gregmisc/?rev=1061&view=rev Author: warnes Date: 2007-03-01 14:43:18 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Fix typo Modified Paths: -------------- trunk/PathwayModeling/thesispaper/priorPlot.Snw Modified: trunk/PathwayModeling/thesispaper/priorPlot.Snw =================================================================== --- trunk/PathwayModeling/thesispaper/priorPlot.Snw 2007-03-01 22:42:15 UTC (rev 1060) +++ trunk/PathwayModeling/thesispaper/priorPlot.Snw 2007-03-01 22:43:18 UTC (rev 1061) @@ -2,7 +2,7 @@ \centering <<priorPlot,echo=F,eval=T,fig=T,width=3,height=3>>=4 -f20 <- function(x) dchisq(3*x/20, df=5) +f <- function(x, mu=20) dchisq(3*x/mu, df=5) plot( f, from=0, to=150, xlab=expression(mu[i]), ylab="density", lwd=2) abline(v=20,lty=2,lwd=2) mtext(text="20", side=1, at=20, line=0.5) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |