r-gregmisc-users Mailing List for R gregmisc package (Page 16)
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...> - 2013-05-11 20:06:58
|
Revision: 1652 http://sourceforge.net/p/r-gregmisc/code/1652 Author: warnes Date: 2013-05-11 20:06:55 +0000 (Sat, 11 May 2013) Log Message: ----------- Replace file.path(path.package(...)) with system.file(...) Modified Paths: -------------- trunk/SASxport/man/Alfalfa.Rd trunk/SASxport/man/lookup.xport.Rd Modified: trunk/SASxport/man/Alfalfa.Rd =================================================================== --- trunk/SASxport/man/Alfalfa.Rd 2013-05-11 20:05:57 UTC (rev 1651) +++ trunk/SASxport/man/Alfalfa.Rd 2013-05-11 20:06:55 UTC (rev 1652) @@ -30,7 +30,7 @@ # go were the data is... here <- getwd() -setwd(file.path(path.package("SASxport"),"extdata")) +setwd(system.file("extdata",package="SASxport")) # Description of the file contents lookup.xport("Alfalfa.xpt") Modified: trunk/SASxport/man/lookup.xport.Rd =================================================================== --- trunk/SASxport/man/lookup.xport.Rd 2013-05-11 20:05:57 UTC (rev 1651) +++ trunk/SASxport/man/lookup.xport.Rd 2013-05-11 20:06:55 UTC (rev 1652) @@ -45,7 +45,8 @@ } \examples{ \dontshow{ -setwd(file.path(path.package("SASxport"),"extData")) +setwd(system.file("extdata", package="SASxport")) + } ## Get information on a local file lookup.xport("Alfalfa.xpt") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-05-11 20:05:59
|
Revision: 1651 http://sourceforge.net/p/r-gregmisc/code/1651 Author: warnes Date: 2013-05-11 20:05:57 +0000 (Sat, 11 May 2013) Log Message: ----------- Carry bug fix forward to handle loading xport data when a dataset ends on exactly 80 byte block boundry. Added Paths: ----------- trunk/SASxport/tests/events.csv trunk/SASxport/tests/exposure.csv trunk/SASxport/tests/testBlockBoundary.R Added: trunk/SASxport/tests/events.csv =================================================================== --- trunk/SASxport/tests/events.csv (rev 0) +++ trunk/SASxport/tests/events.csv 2013-05-11 20:05:57 UTC (rev 1651) @@ -0,0 +1,11 @@ +"NID","TIME","DINTV","EVID","AUC","CMAX","TMAX","RT","CMIN","IPRED","CWRES","DV","PRED","RES","WRES" +1,0,1,1,0,-1,-1,-1,9999,0,0,0,0,0,0 +1,1,1,0,7.8964,14.918,1,1,14.918,14.918,-3.0776,5.24,24.54,-19.3,-3.3211 +1,2,1,2,22.436,15.298,1.2179,1.2179,12.845,12.845,0,0,14.455,0,0 +1,3,1,2,32.934,15.298,1.2179,1.2179,8.2815,8.2815,0,0,9.0077,0,0 +1,4,1,2,39.464,15.298,1.2179,1.2179,5.0233,5.0233,0,0,5.9024,0,0 +1,5,1,2,43.403,15.298,1.2179,1.2179,3.0246,3.0246,0,0,4.0132,0,0 +1,6,1,2,45.78,15.298,1.2179,1.2179,1.8323,1.8323,0,0,2.7974,0,0 +1,7,1,2,47.224,15.298,1.2179,1.2179,1.1164,1.1164,0,0,1.9773,0,0 +1,8,1,2,48.105,15.298,1.2179,1.2179,0.68056,0.68057,0,0,1.4036,0,0 +1,9,1,2,48.641,15.298,1.2179,1.2179,0.41253,0.41253,0,0,0.99249,0,0 Added: trunk/SASxport/tests/exposure.csv =================================================================== --- trunk/SASxport/tests/exposure.csv (rev 0) +++ trunk/SASxport/tests/exposure.csv 2013-05-11 20:05:57 UTC (rev 1651) @@ -0,0 +1,2 @@ +"NID","DINTV","CMAX","TMAX","CMIN","AUC" +NA,NA,NA,NA,NA,NA Added: trunk/SASxport/tests/testBlockBoundary.R =================================================================== --- trunk/SASxport/tests/testBlockBoundary.R (rev 0) +++ trunk/SASxport/tests/testBlockBoundary.R 2013-05-11 20:05:57 UTC (rev 1651) @@ -0,0 +1,33 @@ +## This script tests an edge case where a dataset ends exactly on a +## block boundery. Previously, this could lead to an error in +## loading the created data file. + +library(SASxport) +events <- read.csv('events.csv') +exposure <- read.csv('exposure.csv') +events +exposure + + +write.xport(events,exposure,file='dat.xpt') +write.xport(exposure,events,file='tad.xpt') + +l1.s <- SASxport::lookup.xport('dat.xpt') +l2.s <- SASxport::lookup.xport('tad.xpt') + +stopifnot( identical( l1.s$EXPOSURE, l2.s$EXPOSURE) ) +stopifnot( identical( l1.s$EVENTS, l2.s$EVENTS ) ) + +d1.s <- SASxport::read.xport(file='dat.xpt') +d2.s <- SASxport::read.xport(file='tad.xpt') + +stopifnot( identical( d1.s$EXPOSURE, d2.s$EXPOSURE) ) +stopifnot( identical( d1.s$EVENTS, d2.s$EVENTS) ) + + + + + + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-05-11 17:00:02
|
Revision: 1650 http://sourceforge.net/p/r-gregmisc/code/1650 Author: warnes Date: 2013-05-11 16:59:58 +0000 (Sat, 11 May 2013) Log Message: ----------- Remove obsolete .First.lib() Modified Paths: -------------- trunk/SASxport/R/zzz.R Modified: trunk/SASxport/R/zzz.R =================================================================== --- trunk/SASxport/R/zzz.R 2013-03-24 05:42:57 UTC (rev 1649) +++ trunk/SASxport/R/zzz.R 2013-05-11 16:59:58 UTC (rev 1650) @@ -10,12 +10,6 @@ } - -.First.lib <- function(lib, pkg) { - library.dynam("SASxport", pkg, lib) - loadMessage() -} - .onLoad <- function(lib, pkg) { loadMessage() } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 05:43:00
|
Revision: 1649 http://sourceforge.net/p/r-gregmisc/code/1649 Author: warnes Date: 2013-03-24 05:42:57 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Update for release 1.3.1 Modified Paths: -------------- trunk/SASxport/DESCRIPTION trunk/SASxport/inst/NEWS Modified: trunk/SASxport/DESCRIPTION =================================================================== --- trunk/SASxport/DESCRIPTION 2013-03-24 05:41:53 UTC (rev 1648) +++ trunk/SASxport/DESCRIPTION 2013-03-24 05:42:57 UTC (rev 1649) @@ -1,34 +1,34 @@ Package: SASxport Type: Package Title: Read and Write SAS XPORT Files -Version: 1.3.0 -Date: 2012-06-29 +Version: 1.3.1 +Date: 2013-03-24 Description: This package provides functions for reading, listing - the contents of, and writing SAS xport format files. + the contents of, and writing SAS xport format files. The functions support reading and writing of either individual data frames or sets of data frames. Further, a mechanism has been provided for customizing how - variables of different data types are stored. -Author: + variables of different data types are stored. +Author: Unless otherwise noted, the contents of this package were written by Gregory R. Warnes <gr...@wa...> and are provided under the - terms of the GNU General Public License, version 2.0 or later. + terms of the GNU General Public License, version 2.0 or later. -- - The files 'ieee2ibm.c' and 'ibm2ieee.c' were extracted from BRL-CAD, - file /brlcad/src/libbu/htond.c written by Michael John Muuss, + The files 'ieee2ibm.c' and 'ibm2ieee.c' were extracted from BRL-CAD, + file /brlcad/src/libbu/htond.c written by Michael John Muuss, Copyright (c) 2004-2007 United States Government as represented by the U.S. Army Research Laboratory, and is utilized and redistributed under the terms of the GNU Lesser General Public License, version 2.1. -- The files 'AFirst.lib.s', 'all.is.numeric.R', - 'importConvertDateTime.R', 'in.opererator.R', 'makeNames.R', + 'importConvertDateTime.R', 'in.opererator.R', 'makeNames.R', 'read.xport.R', and 'testDateTime.R' are copied or adapted from the - 'Hmisc' package created by Frank E. Harrell, Jr. + 'Hmisc' package created by Frank E. Harrell, Jr. <f.h...@va...>, and are utilized and redistributed under - the terms of the GNU General Public License, version 2.0 or later. - -- + the terms of the GNU General Public License, version 2.0 or later. + -- The creation of this package was partially funded by Metrum Institute - <http://metruminstitute.org>. + <http://metruminstitute.org>. Maintainer: Gregory R. Warnes <gr...@wa...> License: GPL-2 Depends: R (>= 2.4.0) Modified: trunk/SASxport/inst/NEWS =================================================================== --- trunk/SASxport/inst/NEWS 2013-03-24 05:41:53 UTC (rev 1648) +++ trunk/SASxport/inst/NEWS 2013-03-24 05:42:57 UTC (rev 1649) @@ -1,3 +1,10 @@ +Version 1.3.1 2013-03-24 +------------------------ + +Changes: + +- Replace use of depreciated .path.package() with path.package() for R 3.0.0. + Version 1.3.0 2012-06-27 ------------------------ @@ -37,7 +44,7 @@ Bug fixes: - Apply patches to fix problems on 64 bit platforms, as sumitted by - Brian Ripley. + Brian Ripley. Version 1.2.1 2007-11-05 @@ -63,27 +70,27 @@ - Copies of the code for foreign::read.xport and foreign::lookup.xport is now part of the SASxport package, permitting extension to these functions as needed, and removing the dependency on the foreign - package. + package. - Overflow of SASxport numeric format values, which have a smaller range than IEEE 754 numeric values now standard, now generates NAN - instead of 0.0. + instead of 0.0. Bug Fixes: - Fix for problem storing negative numbers. -- SAS format length and digit information is now properly captured +- SAS format length and digit information is now properly captured by read.xport(). This is supported by an improved version of - lookup.xport(). + lookup.xport(). -- SAS format information was not being properly utilized when more +- SAS format information was not being properly utilized when more than one format was present. - Improved handling of SAS date formats - + Other: - Test routines added to test handling of numeric values. @@ -95,7 +102,7 @@ - Display support information at package startup -Version 1.1.0 - +Version 1.1.0 - ------------------------- New Features: @@ -133,7 +140,7 @@ New features: - read.xport's names.tolower argument now defaults to FALSE so that - variable (and data set) names are now left as uppercase. + variable (and data set) names are now left as uppercase. - Improved crediting of BRL-CAD source code @@ -143,7 +150,7 @@ Other: -- Augmented ieee2ibm code with corresponding ibm2ieee code for +- Augmented ieee2ibm code with corresponding ibm2ieee code for completeness. @@ -152,7 +159,7 @@ New Features: -- Replaced IEEE to IBM translation code with GPL'ed version from BPL-CAD. +- Replaced IEEE to IBM translation code with GPL'ed version from BPL-CAD. Bug Fixes: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 05:41:56
|
Revision: 1648 http://sourceforge.net/p/r-gregmisc/code/1648 Author: warnes Date: 2013-03-24 05:41:53 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Replace obsolete use of .path.package() with path.package() Modified Paths: -------------- trunk/SASxport/man/Alfalfa.Rd trunk/SASxport/man/lookup.xport.Rd Modified: trunk/SASxport/man/Alfalfa.Rd =================================================================== --- trunk/SASxport/man/Alfalfa.Rd 2013-03-24 05:21:31 UTC (rev 1647) +++ trunk/SASxport/man/Alfalfa.Rd 2013-03-24 05:41:53 UTC (rev 1648) @@ -30,7 +30,7 @@ # go were the data is... here <- getwd() -setwd(file.path(.path.package("SASxport"),"extdata")) +setwd(file.path(path.package("SASxport"),"extdata")) # Description of the file contents lookup.xport("Alfalfa.xpt") Modified: trunk/SASxport/man/lookup.xport.Rd =================================================================== --- trunk/SASxport/man/lookup.xport.Rd 2013-03-24 05:21:31 UTC (rev 1647) +++ trunk/SASxport/man/lookup.xport.Rd 2013-03-24 05:41:53 UTC (rev 1648) @@ -45,7 +45,7 @@ } \examples{ \dontshow{ -setwd(file.path(.path.package("SASxport"),"extData")) +setwd(file.path(path.package("SASxport"),"extData")) } ## Get information on a local file lookup.xport("Alfalfa.xpt") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 05:21:33
|
Revision: 1647 http://sourceforge.net/p/r-gregmisc/code/1647 Author: warnes Date: 2013-03-24 05:21:31 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Update news for release 2.11.2 Modified Paths: -------------- trunk/gplots/inst/NEWS Modified: trunk/gplots/inst/NEWS =================================================================== --- trunk/gplots/inst/NEWS 2013-03-24 05:19:04 UTC (rev 1646) +++ trunk/gplots/inst/NEWS 2013-03-24 05:21:31 UTC (rev 1647) @@ -1,3 +1,17 @@ +Release 2.11.2 - 2013-03-24 +--------------------------- + +Enhancements: + +- Add ci.width argument to barplot2() to allow varying the length of + the 't' at the end of confidence interval bars. + +Updates: + +- Update manual page for lowess.default() to + match changed argument list for lowess() in R 3.0.0 + + Release 2.11.1 - 2012-12-14 --------------------------- @@ -41,7 +55,7 @@ New Features: - New ci2d() function to create 2-dimensional empirical confidence - intervals utilizing KernSmooth:bkde2D and gplots::hist2d(). + intervals utilizing KernSmooth:bkde2D and gplots::hist2d(). See ?ci2d for details. - Add 'alpha' argument to rich.colors() to control transparency. @@ -66,7 +80,7 @@ - venn() now returns an object of class venn() and a plot method for this class is provided. -- Manual page for venn has been improved, based on contributions by +- Manual page for venn has been improved, based on contributions by Steffen Moeller @@ -75,7 +89,7 @@ Improvements: -- Performance of 'hist2d' improved thanks to a suggestion from +- Performance of 'hist2d' improved thanks to a suggestion from Joerg van den Hoff. Release 2.7.4 - 2009-11-12 @@ -126,14 +140,14 @@ colDendrogram, breaks, col, vline, hline, and colorTable. Of these, the most useful are breaks, col, and colorTable. The latter is a three-column data frame providing the lower and - upper bound and color for each bin. + upper bound and color for each bin. See the manual page for complete details and examples. - New function venn(), contributed by Steffen Moeller (Thanks Steffen!) to generate Venn diagrams for up to 5 sets. See ?venn for - details. + details. - Performance of bandplot() has been dramatically improved, in part by using runsd() and runmean() from the caTools package. As a @@ -151,10 +165,10 @@ Bug Fixes: - balloonplot() now properly handles dimension labels provided by - 'xlab' and 'ylab' + 'xlab' and 'ylab' - plotCI now properly handles 'NULL' and 'NA' values for ui, li, uiw, - and liw. + and liw. - Corrections of minor typos in man pages @@ -164,7 +178,7 @@ Release 2.6.0 - 2008-04-07 -------------------------- -New Features: +New Features: - heatmap() now allows control of the location of individual plot components (e.g. color key) @@ -179,7 +193,7 @@ - Restore plot layout settings to default state at end of ooplot() example -- Various typo fixes +- Various typo fixes Release 2.5.0 - 2007-11-02 -------------------------- @@ -187,7 +201,7 @@ New Features: - textplot() now converts tab characters to spaces before processing to - avoid problems with computing height and width of text that includes + avoid problems with computing height and width of text that includes tabs. - Add col2hex() function to convert color names to rgb hex codes @@ -195,7 +209,7 @@ Bug Fixes: - Correct balloonplot.default to properly show specified x and y axis - labels when explicitly provided + labels when explicitly provided - R/balloonplot.R: Correct error in balloonplot when z contains NA values. @@ -204,7 +218,7 @@ Other: - Clarify GPL version - + Release 2.4.0 - 2007-02-08 -------------------------- @@ -218,7 +232,7 @@ Bug Fixes: -Other: +Other: Release 2.3.2 - 2006-11-14 @@ -254,9 +268,9 @@ ------------- - plotmeans.R: Fixed bug in plotmeans - based on Stefano Calza's - suggestion (the function didn't account for factors + suggestion (the function didn't account for factors unused levels, returning an error.) - + - exported plot.lm to NAMESPACE, Remove .Alias calls in plot.lm.R since .Alias is defunct. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 05:19:07
|
Revision: 1646 http://sourceforge.net/p/r-gregmisc/code/1646 Author: warnes Date: 2013-03-24 05:19:04 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Add ci.width argument to barplot2() to allow varying the length of the 't' at the end of confidence interval bars. Modified Paths: -------------- trunk/gplots/R/barplot2.R trunk/gplots/man/barplot2.Rd Modified: trunk/gplots/R/barplot2.R =================================================================== --- trunk/gplots/R/barplot2.R 2013-03-24 04:50:22 UTC (rev 1645) +++ trunk/gplots/R/barplot2.R 2013-03-24 05:19:04 UTC (rev 1646) @@ -12,30 +12,60 @@ barplot2 <- function(height, ...) UseMethod("barplot2") barplot2.default <- - function( - height, - width = 1, - space = NULL, - names.arg = NULL, - legend.text = NULL, - beside = FALSE, - horiz = FALSE, - density = NULL, - angle = 45, - col = NULL, - prcol = NULL, - border = par("fg"), - main = NULL, - sub = NULL, xlab = NULL, ylab = NULL, - xlim = NULL, ylim = NULL, xpd = TRUE, log = "", - axes = TRUE, axisnames = TRUE, - cex.axis = par("cex.axis"), cex.names = par("cex.axis"), - inside = TRUE, plot = TRUE, axis.lty = 0, offset = 0, - plot.ci = FALSE, ci.l = NULL, ci.u = NULL, - ci.color = "black", ci.lty = "solid", ci.lwd = 1, - plot.grid = FALSE, grid.inc = NULL, - grid.lty = "dotted", grid.lwd = 1, grid.col = "black", - add = FALSE, panel.first = NULL, panel.last = NULL, ...) + function( + height, + width = 1, + space = NULL, + names.arg = NULL, + legend.text = NULL, + beside = FALSE, + horiz = FALSE, + density = NULL, + angle = 45, + col = NULL, + prcol = NULL, + border = par("fg"), + main = NULL, + sub = NULL, + xlab = NULL, + ylab = NULL, + + xlim = NULL, + ylim = NULL, + xpd = TRUE, + log = "", + + axes = TRUE, + axisnames = TRUE, + + cex.axis = par("cex.axis"), + cex.names = par("cex.axis"), + + inside = TRUE, + plot = TRUE, + axis.lty = 0, + offset = 0, + + plot.ci = FALSE, + ci.l = NULL, + ci.u = NULL, + + ci.color = "black", + ci.lty = "solid", + ci.lwd = 1, + ci.width = 0.5, + + plot.grid = FALSE, + grid.inc = NULL, + + grid.lty = "dotted", + grid.lwd = 1, + grid.col = "black", + + add = FALSE, + panel.first = NULL, + panel.last = NULL, + ...) { if (!missing(inside)) .NotYetUsed("inside", error = FALSE)# -> help(.) @@ -137,10 +167,10 @@ # Check for NA values and issue warning if required height.na <- sum(is.na(height)) if (height.na > 0) - { + { warning(sprintf("%.0f values == NA in 'height' omitted from logarithmic plot", height.na), domain = NA) - } + } # Check for 0 values and issue warning if required # _FOR NOW_ change 0's to NA's so that other calculations are not @@ -148,15 +178,15 @@ # except for stacked bars, so don't change those. height.lte0 <- sum(height <= 0, na.rm = TRUE) if (height.lte0 > 0) - { + { warning(sprintf("%0.f values <=0 in 'height' omitted from logarithmic plot", height.lte0), domain = NA) - + # If NOT stacked bars, modify 'height' if (beside) height[height <= 0] <- NA - } - + } + if (plot.ci && (min(ci.l) <= 0)) stop("log scale error: at least one lower c.i. value <= 0") @@ -172,12 +202,12 @@ { rectbase <- c(height[is.finite(height)], ci.l) rectbase <- min(0.9 * rectbase[rectbase > 0]) - } + } else { rectbase <- height[is.finite(height)] rectbase <- min(0.9 * rectbase[rectbase > 0]) - } + } # if axis limit is set to < above, adjust bar base value # to draw a full bar @@ -253,7 +283,7 @@ # Execute the panel.first expression. This will work here # even if 'add = TRUE' panel.first - + # Set plot region coordinates usr <- par("usr") @@ -335,23 +365,23 @@ # Execute the panel.last expression here panel.last - + if (plot.ci) { # CI plot width = barwidth / 2 - ci.width = width / 4 + half.ci.width = width * ci.width / 2 if (horiz) { segments(ci.l, w.m, ci.u, w.m, col = ci.color, lty = ci.lty, lwd = ci.lwd) - segments(ci.l, w.m - ci.width, ci.l, w.m + ci.width, col = ci.color, lty = ci.lty, lwd = ci.lwd) - segments(ci.u, w.m - ci.width, ci.u, w.m + ci.width, col = ci.color, lty = ci.lty, lwd = ci.lwd) + segments(ci.l, w.m - half.ci.width, ci.l, w.m + half.ci.width, col = ci.color, lty = ci.lty, lwd = ci.lwd) + segments(ci.u, w.m - half.ci.width, ci.u, w.m + half.ci.width, col = ci.color, lty = ci.lty, lwd = ci.lwd) } else { segments(w.m, ci.l, w.m, ci.u, col = ci.color, lty = ci.lty, lwd = ci.lwd) - segments(w.m - ci.width, ci.l, w.m + ci.width, ci.l, col = ci.color, lty = ci.lty, lwd = ci.lwd) - segments(w.m - ci.width, ci.u, w.m + ci.width, ci.u, col = ci.color, lty = ci.lty, lwd = ci.lwd) + segments(w.m - half.ci.width, ci.l, w.m + half.ci.width, ci.l, col = ci.color, lty = ci.lty, lwd = ci.lwd) + segments(w.m - half.ci.width, ci.u, w.m + half.ci.width, ci.u, col = ci.color, lty = ci.lty, lwd = ci.lwd) } } Modified: trunk/gplots/man/barplot2.Rd =================================================================== --- trunk/gplots/man/barplot2.Rd 2013-03-24 04:50:22 UTC (rev 1645) +++ trunk/gplots/man/barplot2.Rd 2013-03-24 05:19:04 UTC (rev 1646) @@ -84,8 +84,8 @@ axes = TRUE, axisnames = TRUE, cex.axis = par("cex.axis"), cex.names = par("cex.axis"), inside = TRUE, plot = TRUE, axis.lty = 0, offset = 0, - plot.ci = FALSE, ci.l = NULL, - ci.u = NULL, ci.color = "black", ci.lty = "solid", ci.lwd = 1, + plot.ci = FALSE, ci.l = NULL, ci.u = NULL, + ci.color = "black", ci.lty = "solid", ci.lwd = 1, ci.width = 0.5, plot.grid = FALSE, grid.inc = NULL, grid.lty = "dotted", grid.lwd = 1, grid.col = "black", add = FALSE, panel.first = NULL, panel.last = NULL, \dots) @@ -176,7 +176,10 @@ the same dim structure as \code{height}.} \item{ci.color}{the color for the confidence interval line segments} \item{ci.lty}{the line type for the confidence interval line segments} - \item{ci.lwd}{the line width for the confidence interval line segments} + \item{ci.lwd}{the line width for the confidence interval line + segments} + \item{ci.width}{length of lines used for the "t" at the end of confidence + interval line segments, as a multple of \code{width}. Defaults to 0.5.} \item{plot.grid}{if \code{TRUE} a lined grid will be plotted behind the bars} \item{grid.inc}{the number of grid increments to be plotted} \item{grid.lty}{the line type for the grid} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 04:50:25
|
Revision: 1645 http://sourceforge.net/p/r-gregmisc/code/1645 Author: warnes Date: 2013-03-24 04:50:22 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Update test files for code changes Modified Paths: -------------- trunk/gdata/tests/test.read.xls.Rout.save trunk/gdata/tests/tests.write.fwf.Rout.save Modified: trunk/gdata/tests/test.read.xls.Rout.save =================================================================== --- trunk/gdata/tests/test.read.xls.Rout.save 2013-03-24 04:36:45 UTC (rev 1644) +++ trunk/gdata/tests/test.read.xls.Rout.save 2013-03-24 04:50:22 UTC (rev 1645) @@ -1,8 +1,8 @@ -R version 2.15.0 (2012-03-30) -Copyright (C) 2012 The R Foundation for Statistical Computing +R version 2.15.3 Patched (2013-03-13 r62287) -- "Security Blanket" +Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 -Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -38,7 +38,7 @@ + } > > # iris.xls is included in the gregmisc package for use as an example -> xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') +> xlsfile <- file.path(path.package('gdata'),'xls','iris.xls') > > iris.1 <- read.xls(xlsfile) # defaults to csv format > iris.1 @@ -505,10 +505,10 @@ > stopifnot(all.equal(iris.1, iris.2)) > stopifnot(all.equal(iris.1, iris.3)) > -> exampleFile <- file.path(.path.package('gdata'),'xls', +> exampleFile <- file.path(path.package('gdata'),'xls', + 'ExampleExcelFile.xls') > -> exampleFile2007 <- file.path(.path.package('gdata'),'xls', +> exampleFile2007 <- file.path(path.package('gdata'),'xls', + 'ExampleExcelFile.xlsx') > > # see the number and names of sheets: @@ -669,18 +669,28 @@ > > ## Check handing of fileEncoding for latin-1 characters > -> latin1File <- file.path(.path.package('gdata'),'xls', 'latin-1.xls') -> latin1FileX <- file.path(.path.package('gdata'),'xls', 'latin-1.xlsx') +> latin1File <- file.path(path.package('gdata'),'xls', 'latin-1.xls') +> latin1FileX <- file.path(path.package('gdata'),'xls', 'latin-1.xlsx') > > example.latin1 <- read.xls(latin1File, fileEncoding='latin1') +Warning messages: +1: In read.table(file = file, header = header, sep = sep, quote = quote, : + invalid input found on input connection '/var/folders/dG/dGl84jhkHAe+alfrBBIYKE+++TQ/-Tmp-//RtmpGQaXAS/file4640360d0390.csv' +2: In read.table(file = file, header = header, sep = sep, quote = quote, : + incomplete final line found by readTableHeader on '/var/folders/dG/dGl84jhkHAe+alfrBBIYKE+++TQ/-Tmp-//RtmpGQaXAS/file4640360d0390.csv' > > if( 'XLSX' %in% xlsFormats() ) + { + example.latin1.x <- read.xls(latin1FileX, fileEncoding='latin1') + } +Warning messages: +1: In read.table(file = file, header = header, sep = sep, quote = quote, : + invalid input found on input connection '/var/folders/dG/dGl84jhkHAe+alfrBBIYKE+++TQ/-Tmp-//RtmpGQaXAS/file46401064fea9.csv' +2: In read.table(file = file, header = header, sep = sep, quote = quote, : + incomplete final line found by readTableHeader on '/var/folders/dG/dGl84jhkHAe+alfrBBIYKE+++TQ/-Tmp-//RtmpGQaXAS/file46401064fea9.csv' > > > > proc.time() user system elapsed - 3.564 0.436 4.186 + 6.693 0.979 7.921 Modified: trunk/gdata/tests/tests.write.fwf.Rout.save =================================================================== --- trunk/gdata/tests/tests.write.fwf.Rout.save 2013-03-24 04:36:45 UTC (rev 1644) +++ trunk/gdata/tests/tests.write.fwf.Rout.save 2013-03-24 04:50:22 UTC (rev 1645) @@ -1,8 +1,8 @@ -R version 2.15.0 (2012-03-30) -Copyright (C) 2012 The R Foundation for Statistical Computing +R version 2.15.3 Patched (2013-03-13 r62287) -- "Security Blanket" +Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 -Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) +Platform: i386-apple-darwin9.8.0/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -232,4 +232,4 @@ > > proc.time() user system elapsed - 0.430 0.041 0.465 + 0.830 0.090 0.906 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 04:36:48
|
Revision: 1644 http://sourceforge.net/p/r-gregmisc/code/1644 Author: warnes Date: 2013-03-24 04:36:45 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Fix formatting in NEWS Modified Paths: -------------- trunk/gdata/inst/NEWS Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2013-03-24 04:34:45 UTC (rev 1643) +++ trunk/gdata/inst/NEWS 2013-03-24 04:36:45 UTC (rev 1644) @@ -3,7 +3,8 @@ Enhancements: -- Replaced calls to depreciated function ".path.package" with the new public function "path.package". +- Replaced calls to depreciated function ".path.package" with the new + public function "path.package". Changes in 2.13.0 (2012-09-20) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 04:34:48
|
Revision: 1643 http://sourceforge.net/p/r-gregmisc/code/1643 Author: warnes Date: 2013-03-24 04:34:45 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Replaced calls to depreciated function ".path.package" with the new public function "path.package". Modified Paths: -------------- trunk/gdata/DESCRIPTION trunk/gdata/inst/NEWS trunk/gdata/man/read.xls.Rd trunk/gdata/man/sheetCount.Rd trunk/gdata/tests/test.read.xls.R Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2013-03-24 04:20:02 UTC (rev 1642) +++ trunk/gdata/DESCRIPTION 2013-03-24 04:34:45 UTC (rev 1643) @@ -4,8 +4,8 @@ Depends: R (>= 2.13.0) SystemRequirements: perl Imports: gtools -Version: 2.13.0 -Date: 2012-09-20 +Version: 2.13.1 +Date: 2013-03-24 Author: Gregory R. Warnes, with contributions from Liviu Andronic, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2013-03-24 04:20:02 UTC (rev 1642) +++ trunk/gdata/inst/NEWS 2013-03-24 04:34:45 UTC (rev 1643) @@ -1,3 +1,11 @@ +Changes in 2.13.1 (2013-03-24) +------------------------------ + +Enhancements: + +- Replaced calls to depreciated function ".path.package" with the new public function "path.package". + + Changes in 2.13.0 (2012-09-20) ----------------------------- @@ -31,9 +39,9 @@ - 'stats::aggregate' was made into a generic on 27-Jan-2010, so that attempting to call 'aggregate' on a 'table' object will now incorrectly call 'aggregate.table'. Since 'aggregate.table' can be - replaced by a call to tapply using two index vectors, e.g. - aggregate.table(x, by1=a, by2=b, mean) - can be replaced by + replaced by a call to tapply using two index vectors, e.g. + aggregate.table(x, by1=a, by2=b, mean) + can be replaced by tapply(x, INDEX=list(a, b), FUN=mean), the 'aggregate.table' function will now display a warning that it is depreciated and recommending the equivalent call to tapply. It @@ -161,7 +169,7 @@ Enhancements: -- nPairs() gains a summary method that shows how many times each variable +- nPairs() gains a summary method that shows how many times each variable is known, while the other variable of a pair is not Bug fixes: @@ -222,7 +230,7 @@ build issues, particularly on Windows. - All perl code can now operate (but generate warnings) when perl modules Compress::Raw::Zlib and - Spreadsheet::XLSX when are not installed. + Spreadsheet::XLSX when are not installed. - Also update Greg's email address. @@ -231,8 +239,8 @@ Enhancements: -- on Windows attempts to locate ActiveState perl if perl= not specified and - Rtools perl would have otherwise been used in read.xls and other perl +- on Windows attempts to locate ActiveState perl if perl= not specified and + Rtools perl would have otherwise been used in read.xls and other perl dependent functions. CHANGES IN 2.7.0 (2010-01-25) @@ -260,7 +268,7 @@ New Functions: -- sheetCount() and sheetNames() to determine the number and names of +- sheetCount() and sheetNames() to determine the number and names of worksheets in an Excel file, respectively. Bug Fixes: @@ -285,7 +293,7 @@ Bug Fixes - Correct minor typos & issues in man pages for write.fwf(), - resample() (Greg Warnes) + resample() (Greg Warnes) - Correct calculation of object sizes in env() and ll() (Gregor Gorjanc) @@ -297,20 +305,20 @@ - Enhanced function object.size that returns the size of multiple objects. There is also a handy print method that can print size of an object in "human readable" format when - options(humanReadable=TRUE) - or - print(object.size(x), humanReadable=TRUE). - (Gregor Gorjanc) + options(humanReadable=TRUE) + or + print(object.size(x), humanReadable=TRUE). + (Gregor Gorjanc) - New function wideByFactor that reshapes given dataset by a given - factor - it creates a "multivariate" data.frame. (Gregor Gorjanc) + factor - it creates a "multivariate" data.frame. (Gregor Gorjanc) - New function nPairs that gives the number of variable pairs in a - data.frame or a matrix. (Gregor Gorjanc) + data.frame or a matrix. (Gregor Gorjanc) - New functions getYear, getMonth, getDay, getHour, getMin, and getSec for extracting the date/time parts from objects of a date/time - class. (Gregor Gorjanc) + class. (Gregor Gorjanc) - New function bindData that binds two data frames into a multivariate data frame in a different way than merge. (Gregor Gorjanc) @@ -332,7 +340,7 @@ - New function bindData that binds two data frames into a multivariate data frame in a different way than merge. - + - New function wideByFactor that reshapes given dataset by a given factor - it creates a "multivariate" data.frame. @@ -346,7 +354,7 @@ - New function cbindX that can bind objects with different number of rows. -- write.fwf gains the width argument. The value for unknown can increase or +- write.fwf gains the width argument. The value for unknown can increase or decrease the width of the columns. Additional tests and documentation fixes. CHANGES IN 2.4.2 (2008-05-11) Modified: trunk/gdata/man/read.xls.Rd =================================================================== --- trunk/gdata/man/read.xls.Rd 2013-03-24 04:20:02 UTC (rev 1642) +++ trunk/gdata/man/read.xls.Rd 2013-03-24 04:34:45 UTC (rev 1643) @@ -67,7 +67,7 @@ \examples{ # iris.xls is included in the gregmisc package for use as an example - xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') + xlsfile <- file.path(path.package('gdata'),'xls','iris.xls') xlsfile iris <- read.xls(xlsfile) # defaults to csv format @@ -121,9 +121,9 @@ ## Examples demonstrating selection of specific 'sheets' ## from the example XLS file 'ExampleExcelFile.xls' - exampleFile <- file.path(.path.package('gdata'),'xls', + exampleFile <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xls') - exampleFile2007 <- file.path(.path.package('gdata'),'xls', + exampleFile2007 <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xlsx') ## see the number and names of sheets: @@ -147,7 +147,7 @@ ## load a file containing data and column names using latin-1 ## characters - latinFile <- file.path(.path.package('gdata'),'xls','latin-1.xls') + latinFile <- file.path(path.package('gdata'),'xls','latin-1.xls') latin1 <- read.xls(latinFile, fileEncoding="latin1") colnames(latin1) Modified: trunk/gdata/man/sheetCount.Rd =================================================================== --- trunk/gdata/man/sheetCount.Rd 2013-03-24 04:20:02 UTC (rev 1642) +++ trunk/gdata/man/sheetCount.Rd 2013-03-24 04:34:45 UTC (rev 1643) @@ -34,9 +34,9 @@ sheetCount(xlsfile) - exampleFile <- file.path(.path.package('gdata'),'xls', + exampleFile <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xls') - exampleFile2007 <- file.path(.path.package('gdata'),'xls', + exampleFile2007 <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xlsx') sheetCount(exampleFile) Modified: trunk/gdata/tests/test.read.xls.R =================================================================== --- trunk/gdata/tests/test.read.xls.R 2013-03-24 04:20:02 UTC (rev 1642) +++ trunk/gdata/tests/test.read.xls.R 2013-03-24 04:34:45 UTC (rev 1643) @@ -6,7 +6,7 @@ } # iris.xls is included in the gregmisc package for use as an example -xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') +xlsfile <- file.path(path.package('gdata'),'xls','iris.xls') iris.1 <- read.xls(xlsfile) # defaults to csv format iris.1 @@ -20,10 +20,10 @@ stopifnot(all.equal(iris.1, iris.2)) stopifnot(all.equal(iris.1, iris.3)) -exampleFile <- file.path(.path.package('gdata'),'xls', +exampleFile <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xls') -exampleFile2007 <- file.path(.path.package('gdata'),'xls', +exampleFile2007 <- file.path(path.package('gdata'),'xls', 'ExampleExcelFile.xlsx') # see the number and names of sheets: @@ -86,8 +86,8 @@ ## Check handing of fileEncoding for latin-1 characters -latin1File <- file.path(.path.package('gdata'),'xls', 'latin-1.xls') -latin1FileX <- file.path(.path.package('gdata'),'xls', 'latin-1.xlsx') +latin1File <- file.path(path.package('gdata'),'xls', 'latin-1.xls') +latin1FileX <- file.path(path.package('gdata'),'xls', 'latin-1.xlsx') example.latin1 <- read.xls(latin1File, fileEncoding='latin1') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 04:20:04
|
Revision: 1642 http://sourceforge.net/p/r-gregmisc/code/1642 Author: warnes Date: 2013-03-24 04:20:02 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Update for release 2.11.2 Modified Paths: -------------- trunk/gplots/DESCRIPTION Modified: trunk/gplots/DESCRIPTION =================================================================== --- trunk/gplots/DESCRIPTION 2013-03-24 04:18:22 UTC (rev 1641) +++ trunk/gplots/DESCRIPTION 2013-03-24 04:20:02 UTC (rev 1642) @@ -5,10 +5,10 @@ datasets Recommends: grid Suggests: gtools -Version: 2.11.1 -Date: 2012-12-14 +Version: 2.11.2 +Date: 2012-03-24 Author: Gregory R. Warnes. Includes R source code and/or documentation - contributed by (in alphabetical order): + contributed by (in alphabetical order): Ben Bolker, Lodewijk Bonebakker, Robert Gentleman, Wolfgang Huber Andy Liaw, Thomas Lumley, Martin Maechler, Arni Magnusson, Steffen Moeller, Marc Schwartz, Bill Venables This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-24 04:18:26
|
Revision: 1641 http://sourceforge.net/p/r-gregmisc/code/1641 Author: warnes Date: 2013-03-24 04:18:22 +0000 (Sun, 24 Mar 2013) Log Message: ----------- Update manual page for lowess.default() to match changed argument list for lowess() in R 3.0.0 Modified Paths: -------------- trunk/gplots/man/lowess.Rd Modified: trunk/gplots/man/lowess.Rd =================================================================== --- trunk/gplots/man/lowess.Rd 2013-03-17 02:21:43 UTC (rev 1640) +++ trunk/gplots/man/lowess.Rd 2013-03-24 04:18:22 UTC (rev 1641) @@ -23,7 +23,7 @@ \usage{ lowess(x, ...) \method{lowess}{default}(x, y = NULL, f = 2/3, iter = 3, delta = 0.01 * - diff(range(xy$x[o])), ...) + diff(range(x)), ...) \method{lowess}{formula}(formula,data = parent.frame(), subset, na.action, f=2/3, iter=3, delta=.01*diff(range(mf[-response])), ... ) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-03-17 02:21:46
|
Revision: 1640 http://sourceforge.net/p/r-gregmisc/code/1640 Author: warnes Date: 2013-03-17 02:21:43 +0000 (Sun, 17 Mar 2013) Log Message: ----------- Fix error in smartbind: factor levels were not being handled if the factor column was not present in the first data frame. Modified Paths: -------------- trunk/gtools/R/smartbind.R Modified: trunk/gtools/R/smartbind.R =================================================================== --- trunk/gtools/R/smartbind.R 2013-01-14 20:47:57 UTC (rev 1639) +++ trunk/gtools/R/smartbind.R 2013-03-17 02:21:43 UTC (rev 1640) @@ -19,9 +19,9 @@ retval <- list() rowLens <- unlist(lapply(data, nrow)) nrows <- sum(rowLens) - + rowNameList <- unlist(lapply( names(data), - function(x) + function(x) if(rowLens[x]<=1) x else paste(x, seq(1,rowLens[x]),sep=sep)) ) @@ -29,8 +29,8 @@ colClassList <- vector(mode="list", length=length(data)) factorColumnList <- vector(mode="list", length=length(data)) factorLevelList <- vector(mode="list", length=length(data)) - - + + start <- 1 blockIndex <- 1 for(block in data) @@ -38,7 +38,7 @@ colClassList [[blockIndex]] <- list() factorColumnList[[blockIndex]] <- character(length=0) factorLevelList [[blockIndex]] <- list() - + if(verbose) print(head(block)) end <- start+nrow(block)-1 for(col in colnames(block)) @@ -49,14 +49,14 @@ colClassList[[blockIndex]][[col]] <- classVec if("factor" %in% classVec) { - + factorColumnList[[blockIndex]] <- c(factorColumnList[[blockIndex]], col) - + factorLevelList[[blockIndex]][[col]] <- levels(block[,col]) } - + if( !(col %in% names(retval))) { if(verbose) cat("Start:", start, @@ -69,10 +69,10 @@ } else newclass <- classVec - + retval[[col]] <- as.vector(rep(fill,nrows), mode=newclass) } - + retval[[col]][start:end] <- as.vector(block[,col], mode=class(retval[[col]])) } @@ -87,48 +87,53 @@ else return(all.equal(x,y,...)) } - + ## Handle factors, merging levels for( col in unique(unlist(factorColumnList)) ) { ## Ensure column classes match across blocks colClasses <- lapply(colClassList, function(x) x[[col]]) - allSame <- all(sapply(colClasses[-1], - function(x) isTRUE(all.equal.or.null(colClasses[[1]], x)) + firstNotNull <- which(!sapply(colClasses, is.null))[1] + allSameOrNull <- all(sapply(colClasses[-firstNotNull], + function(x) isTRUE(all.equal.or.null(colClasses[[firstNotNull]], x)) ) ) - if(allSame) - colClass <- colClasses[[1]] + if(allSameOrNull) + { + # grab the first *non-NULL* class information + colClass <- colClasses[[firstNotNull]] + } else { warning("Column class mismatch for '", col, "'. ", "Converting column to class 'character'.") next() } - + ## check if factor levels are all the same colLevels <- lapply(factorLevelList, function(x) x[[col]]) - allSame <- all(sapply(colLevels[-1], - function(x) isTRUE(all.equal.or.null(colLevels[[1]], x)) - ) - ) + firstNotNull <- which(!sapply(colLevels, is.null))[1] + allSameOrNull <- all(sapply(colLevels[-firstNotNull], + function(x) isTRUE(all.equal.or.null(colLevels[[firstNotNull]], x)) + ) + ) - - if(allSame) + + if(allSameOrNull) { if("ordered" %in% colClass) - retval[[col]] <- ordered(retval[[col]], levels=colLevels[[1]] ) + retval[[col]] <- ordered(retval[[col]], levels=colLevels[[firstNotNull]] ) else - retval[[col]] <- factor(retval[[col]], levels=colLevels[[1]] ) + retval[[col]] <- factor(retval[[col]], levels=colLevels[[firstNotNull]] ) } else { ## Check if longest set of levels is a superset of all others, ## and use that one longestIndex <- which.max( sapply(colLevels, length) ) - longestLevels <- colLevels[[longestIndex]] + longestLevels <- colLevels[[longestIndex]] allSubset <- sapply(colLevels[-longestIndex], function(l) all(l %in% longestLevels) ) @@ -144,7 +149,7 @@ # form superset by appending to longest level set levelSuperSet <- unique(c(longestLevels, unlist(colLevels))) retval[[col]] <- factor(retval[[col]], levels=levelSuperSet ) - + if(length(colClass)>1) # not just plain factor { browser() @@ -157,7 +162,7 @@ } } } - + attr(retval,"row.names") <- rowNameList class(retval) <- "data.frame" return(retval) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2013-01-14 20:47:59
|
Revision: 1639 http://sourceforge.net/p/r-gregmisc/code/1639 Author: warnes Date: 2013-01-14 20:47:57 +0000 (Mon, 14 Jan 2013) Log Message: ----------- Replace (obsolete) '.path.package' with 'find.package' function. Modified Paths: -------------- trunk/gdata/R/installXLSXsupport.R trunk/gdata/R/sheetCount.R trunk/gdata/R/xls2sep.R trunk/gdata/R/xlsFormats.R Modified: trunk/gdata/R/installXLSXsupport.R =================================================================== --- trunk/gdata/R/installXLSXsupport.R 2012-12-14 22:50:47 UTC (rev 1638) +++ trunk/gdata/R/installXLSXsupport.R 2013-01-14 20:47:57 UTC (rev 1639) @@ -10,7 +10,7 @@ ## ## directories - package.dir <- .path.package('gdata') + package.dir <- find.package('gdata') perl.dir <- file.path(package.dir,'perl') ## ## Modified: trunk/gdata/R/sheetCount.R =================================================================== --- trunk/gdata/R/sheetCount.R 2012-12-14 22:50:47 UTC (rev 1638) +++ trunk/gdata/R/sheetCount.R 2013-01-14 20:47:57 UTC (rev 1639) @@ -15,7 +15,7 @@ ## ## directories - package.dir <- .path.package('gdata') + package.dir <- find.package('gdata') perl.dir <- file.path(package.dir,'perl') ## ## Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2012-12-14 22:50:47 UTC (rev 1638) +++ trunk/gdata/R/xls2sep.R 2013-01-14 20:47:57 UTC (rev 1639) @@ -36,7 +36,7 @@ ## ## directories - package.dir <- .path.package('gdata') + package.dir <- find.package('gdata') perl.dir <- file.path(package.dir,'perl') ## Modified: trunk/gdata/R/xlsFormats.R =================================================================== --- trunk/gdata/R/xlsFormats.R 2012-12-14 22:50:47 UTC (rev 1638) +++ trunk/gdata/R/xlsFormats.R 2013-01-14 20:47:57 UTC (rev 1639) @@ -10,7 +10,7 @@ ## ## directories - package.dir <- .path.package('gdata') + package.dir <- find.package('gdata') perl.dir <- file.path(package.dir,'perl') ## ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-20 17:35:09
|
Revision: 1622 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1622&view=rev Author: warnes Date: 2012-09-20 17:35:03 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Correct .Rd file errors detected by 'R CMD check'. Modified Paths: -------------- trunk/gdata/man/MedUnits.Rd trunk/gdata/man/ans.Rd trunk/gdata/man/duplicated2.Rd Modified: trunk/gdata/man/MedUnits.Rd =================================================================== --- trunk/gdata/man/MedUnits.Rd 2012-09-20 17:15:20 UTC (rev 1621) +++ trunk/gdata/man/MedUnits.Rd 2012-09-20 17:35:03 UTC (rev 1622) @@ -17,9 +17,9 @@ \describe{ \item{Abbreviation}{Common Abbreviation (mostly missing)} \item{Measurement}{Measurement Name} + \item{ConventionalUnit}{Conventional Unit} + \item{Conversion}{Conversion factor} \item{SIUnit}{SI Unit} - \item{Conversion}{Conversion factor} - \item{ConvetionalUnit}{Conventional Unit} } } \details{ Modified: trunk/gdata/man/ans.Rd =================================================================== --- trunk/gdata/man/ans.Rd 2012-09-20 17:15:20 UTC (rev 1621) +++ trunk/gdata/man/ans.Rd 2012-09-20 17:35:03 UTC (rev 1622) @@ -11,13 +11,13 @@ } \details{ This function retrieves \code{.Last.value}. For more details see - \code{\link{Last.value}}. + \code{\link[base]{.Last.value}}. } \value{ \code{.Last.value} } \seealso{ - \code{\link{Last.value}}, \code{\link{eval}} + \code{\link[base]{.Last.value}}, \code{\link[base]{eval}} } \author{Liviu Andronic} \examples{ Modified: trunk/gdata/man/duplicated2.Rd =================================================================== --- trunk/gdata/man/duplicated2.Rd 2012-09-20 17:15:20 UTC (rev 1621) +++ trunk/gdata/man/duplicated2.Rd 2012-09-20 17:35:03 UTC (rev 1622) @@ -38,7 +38,7 @@ For more details see \code{\link{duplicated}}. } \seealso{ - \code{\link{duplicated}}, \code{\link{unique}} + \code{\link[base]{duplicated}}, \code{\link[base]{unique}} } \author{Liviu Andronic} \examples{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-20 17:15:30
|
Revision: 1621 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1621&view=rev Author: warnes Date: 2012-09-20 17:15:20 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Add duplicated() and ans() to the NAMESPACE. Modified Paths: -------------- trunk/gdata/NAMESPACE Modified: trunk/gdata/NAMESPACE =================================================================== --- trunk/gdata/NAMESPACE 2012-09-20 17:12:14 UTC (rev 1620) +++ trunk/gdata/NAMESPACE 2012-09-20 17:15:20 UTC (rev 1621) @@ -1,6 +1,7 @@ export( .onAttach, + ans, Args, aggregate.table, bindData, @@ -10,6 +11,7 @@ combine, ConvertMedUnits, drop.levels, + duplicated2, elem, env, frameApply, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-20 17:12:21
|
Revision: 1620 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1620&view=rev Author: warnes Date: 2012-09-20 17:12:14 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Update for gdata 2.13.0. Modified Paths: -------------- trunk/gdata/DESCRIPTION trunk/gdata/inst/NEWS Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2012-09-20 15:42:08 UTC (rev 1619) +++ trunk/gdata/DESCRIPTION 2012-09-20 17:12:14 UTC (rev 1620) @@ -4,10 +4,11 @@ Depends: R (>= 2.13.0) SystemRequirements: perl Imports: gtools -Version: 2.12.0 -Date: 2012-10-12 -Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor Gorjanc, - Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, - Arni Magnusson, Jim Rogers, and others +Version: 2.13.0 +Date: 2012-09-20 +Author: Gregory R. Warnes, with contributions from Liviu Andronic, Ben + Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, + Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and + others Maintainer: Gregory Warnes <gr...@wa...> License: GPL-2 Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2012-09-20 15:42:08 UTC (rev 1619) +++ trunk/gdata/inst/NEWS 2012-09-20 17:12:14 UTC (rev 1620) @@ -1,4 +1,29 @@ -Changes in 2.12.0 (2012-10-12) +Changes in 2.13.0 (2012-09-20) +----------------------------- + +New features: + +- New 'duplicated2' function which returns TRUE for *all* elements + that are duplicated, including the first, contributed by Liviu + Andronic. This differs from 'duplicated', which only returns the + second and following (second-to last and previous when + 'fromLast=TRUE') duplicate elements. + +- New 'ans' functon to return the value of the last evaluated + top-level function (a convenience function for accessing + .Last.value), contributed by Liviu Andonic. + +Bug Fixes: + +- On windows, warning messages printed to stdout by perl were being + included in the return value from 'system', resulting in errors in + 'sheetCount' and 'sheetNames'. Corrected. + +- The 'MedUnits' column names 'SIUnits' and 'ConventionalUnits' were + reversed and misspelled. + + +Changes in 2.12.0 (2012-09-12) ------------------------------ Other Changes: @@ -14,7 +39,7 @@ is depreciated and recommending the equivalent call to tapply. It will be removed entirely in a future version of gdata. -Changes in 2.11.1 (2012-09-22) +Changes in 2.11.1 (2012-08-22) ------------------------------ Enhancements: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-20 15:42:14
|
Revision: 1619 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1619&view=rev Author: warnes Date: 2012-09-20 15:42:08 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Fix typographic error. Modified Paths: -------------- trunk/gdata/man/ConvertMedUnits.Rd Modified: trunk/gdata/man/ConvertMedUnits.Rd =================================================================== --- trunk/gdata/man/ConvertMedUnits.Rd 2012-09-20 15:39:43 UTC (rev 1618) +++ trunk/gdata/man/ConvertMedUnits.Rd 2012-09-20 15:42:08 UTC (rev 1619) @@ -30,7 +30,7 @@ This function converts between SI and US 'Conventional' units. If \code{exact=FALSE}, \code{grep} will be used to do a - case-insensitive sub-string search for matching measurment names. If + case-insensitive sub-string search for matching measurement names. If more than one match is found, an error will be generated, along with a list of the matching entries. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-20 15:39:54
|
Revision: 1618 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1618&view=rev Author: warnes Date: 2012-09-20 15:39:43 +0000 (Thu, 20 Sep 2012) Log Message: ----------- Add 'ans()' and 'duplicated()' contributed by Liviu Andronic. Added Paths: ----------- trunk/gdata/R/ans.R trunk/gdata/R/duplicated2.R trunk/gdata/man/ans.Rd trunk/gdata/man/duplicated2.Rd Added: trunk/gdata/R/ans.R =================================================================== --- trunk/gdata/R/ans.R (rev 0) +++ trunk/gdata/R/ans.R 2012-09-20 15:39:43 UTC (rev 1618) @@ -0,0 +1 @@ +ans <- function() .Last.value Added: trunk/gdata/R/duplicated2.R =================================================================== --- trunk/gdata/R/duplicated2.R (rev 0) +++ trunk/gdata/R/duplicated2.R 2012-09-20 15:39:43 UTC (rev 1618) @@ -0,0 +1,8 @@ +duplicated2 <- function(x, bothWays=TRUE, ...) + { + if(!bothWays) { + return(duplicated(x, ...)) + } else if(bothWays) { + return((duplicated(x, ...) | duplicated(x, fromLast=TRUE, ...))) + } + } Added: trunk/gdata/man/ans.Rd =================================================================== --- trunk/gdata/man/ans.Rd (rev 0) +++ trunk/gdata/man/ans.Rd 2012-09-20 15:39:43 UTC (rev 1618) @@ -0,0 +1,34 @@ +\name{ans} +\alias{ans} +\title{Value of Last Evaluated Expression} +\usage{ +ans() +} +\description{ + The functon returns the value of the last evaluated \emph{top-level} + expression, which is always assigned to \code{.Last.value} (in + \code{package:base}). +} +\details{ + This function retrieves \code{.Last.value}. For more details see + \code{\link{Last.value}}. +} +\value{ + \code{.Last.value} +} +\seealso{ + \code{\link{Last.value}}, \code{\link{eval}} +} +\author{Liviu Andronic} +\examples{ + 2+2 # Trivial calculation... + ans() # See the answer again + + gamma(1:15) # Some intensive calculation... + fac14 <- ans() # store the results into a variable + + rnorm(20) # Generate some standard normal values + ans()^2 # Convert to Chi-square(1) values... + stem(ans()) # Now show a stem-and-leaf table +} +\keyword{programming} Added: trunk/gdata/man/duplicated2.Rd =================================================================== --- trunk/gdata/man/duplicated2.Rd (rev 0) +++ trunk/gdata/man/duplicated2.Rd 2012-09-20 15:39:43 UTC (rev 1618) @@ -0,0 +1,51 @@ +\name{duplicated2} +\alias{duplicated2} +\title{Determine Duplicate Elements} +\description{ + \code{duplicated2()} determines which elements of a vector or data + frame are duplicates, and returns a logical vector indicating which + elements (rows) are duplicates. +} +\usage{ +duplicated2(x, bothWays=TRUE, ...) +} +\arguments{ + \item{x}{a vector or a data frame or an array or \code{NULL}.} + \item{bothWays}{if \code{TRUE} (the default), duplication should be + considered from both sides. For more information see the argument \code{fromLast} + to the function \code{\link{duplicated}}.} + \item{\dots}{further arguments passed down to \code{duplicated()} and + its methods.} +} +\details{ + The standard \code{\link{duplicated}} function (in \code{package:base}) + only returns \code{TRUE} for the second and following copies of each + duplicated value (second-to-last and earlier when + \code{fromLast=TRUE}). This function returns all duplicated + elementes, including the first (last) value. + + When \code{bothWays} is \code{FALSE}, \code{duplicated2()} defaults to + a \code{\link{duplicated}} call. When \code{bothWays} is \code{TRUE}, + the following call is being executed: + \code{duplicated(x, ...) | duplicated(x, fromLast=TRUE, ...)} +} +\value{ + For a vector input, a logical vector of the same length as + \code{x}. For a data frame, a logical vector with one element for + each row. For a matrix or array, and when \code{MARGIN = 0}, a + logical array with the same dimensions and dimnames. + + For more details see \code{\link{duplicated}}. +} +\seealso{ + \code{\link{duplicated}}, \code{\link{unique}} +} +\author{Liviu Andronic} +\examples{ + data(iris) + iris[duplicated(iris), ] # 2nd duplicated value + iris[duplicated(iris, fromLast=TRUE), ] # 1st duplicated value + iris[duplicated2(iris), ] # both duplicated values +} +\keyword{logic} +\keyword{manip} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-19 18:30:40
|
Revision: 1617 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1617&view=rev Author: warnes Date: 2012-09-19 18:30:31 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Correct column names. Unit columns were reversed and misspelled. Modified Paths: -------------- trunk/gdata/data/MedUnits.rda Modified: trunk/gdata/data/MedUnits.rda =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-19 18:02:28
|
Revision: 1616 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1616&view=rev Author: warnes Date: 2012-09-19 18:02:18 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Add ignore.stderr to system command in sheetCmd() to prevent stderr messages from being included in the captured output from the perl script. Modified Paths: -------------- trunk/gdata/R/sheetCount.R Modified: trunk/gdata/R/sheetCount.R =================================================================== --- trunk/gdata/R/sheetCount.R 2012-09-19 17:17:15 UTC (rev 1615) +++ trunk/gdata/R/sheetCount.R 2012-09-19 18:02:18 UTC (rev 1616) @@ -61,7 +61,7 @@ cat("... \n\n") } ## - output <- system(cmd, intern=TRUE) + output <- system(cmd, intern=TRUE, ignore.stderr=TRUE) if(verbose) cat("Results: ", output, "\n") ## tc <- textConnection(output) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-19 17:17:21
|
Revision: 1615 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1615&view=rev Author: warnes Date: 2012-09-19 17:17:15 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Move comment about origin of 'makeNamespace' to DESCRIPTION field. Modified Paths: -------------- trunk/namespace/DESCRIPTION Modified: trunk/namespace/DESCRIPTION =================================================================== --- trunk/namespace/DESCRIPTION 2012-09-19 17:15:45 UTC (rev 1614) +++ trunk/namespace/DESCRIPTION 2012-09-19 17:17:15 UTC (rev 1615) @@ -4,11 +4,13 @@ Version: 0.9.1 Date: 2012-09-19 Author: Winston Chang, Daniel Adler, Hadley Wickham, Gregory - R. Warnes, R Core Team ('makeNamespaces' is extracted from the - R 'base' package source code: src/library/base/R/namespace.R) + R. Warnes, R Core Team Maintainer: Gregory R. Warnes <gr...@wa...> Description: This package provides user-level functions to manage namespaces not (yet) available in base R: 'registerNamespace', 'unregisterNamespace', 'makeNamespace', and 'getRegisteredNamespace' + . + ('makeNamespaces' is extracted from the R 'base' package + source code: src/library/base/R/namespace.R) License: GPL-2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2012-09-19 17:15:51
|
Revision: 1614 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1614&view=rev Author: warnes Date: 2012-09-19 17:15:45 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Tell R CMD BUILD to ignore Emacs temporary files. Modified Paths: -------------- trunk/namespace/.Rinstignore Modified: trunk/namespace/.Rinstignore =================================================================== --- trunk/namespace/.Rinstignore 2012-09-19 17:05:48 UTC (rev 1613) +++ trunk/namespace/.Rinstignore 2012-09-19 17:15:45 UTC (rev 1614) @@ -1,4 +1,5 @@ doc/.*\.tex$ doc/.*\.sty$ doc/.*\.dtx$ -\.svn \ No newline at end of file +\.svn +.*~$ \ 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...> - 2012-09-19 17:05:58
|
Revision: 1613 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1613&view=rev Author: warnes Date: 2012-09-19 17:05:48 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Update for release 0.9.1 Modified Paths: -------------- trunk/namespace/DESCRIPTION trunk/namespace/inst/doc/NEWS Modified: trunk/namespace/DESCRIPTION =================================================================== --- trunk/namespace/DESCRIPTION 2012-09-19 16:57:08 UTC (rev 1612) +++ trunk/namespace/DESCRIPTION 2012-09-19 17:05:48 UTC (rev 1613) @@ -1,9 +1,14 @@ Package: namespace Type: Package Title: Provide namespace managment functions not (yet) present in base R -Version: 0.9.0 -Date: 2012-09-13 -Author: Winston Chang, Daniel Adler, Hadley Wickham, Gregory R. Warnes, some code from the R 'base' package. +Version: 0.9.1 +Date: 2012-09-19 +Author: Winston Chang, Daniel Adler, Hadley Wickham, Gregory + R. Warnes, R Core Team ('makeNamespaces' is extracted from the + R 'base' package source code: src/library/base/R/namespace.R) Maintainer: Gregory R. Warnes <gr...@wa...> -Description: More about what it does (maybe more than one line) +Description: This package provides user-level functions to manage + namespaces not (yet) available in base R: + 'registerNamespace', 'unregisterNamespace', + 'makeNamespace', and 'getRegisteredNamespace' License: GPL-2 Modified: trunk/namespace/inst/doc/NEWS =================================================================== --- trunk/namespace/inst/doc/NEWS 2012-09-19 16:57:08 UTC (rev 1612) +++ trunk/namespace/inst/doc/NEWS 2012-09-19 17:05:48 UTC (rev 1613) @@ -1,4 +1,11 @@ -namespace - 0.9.0 - 2012-10-13 +namespace - 0.9.1 - 2012-09-19 ------------------------------ +- Improve package description in 'DESCRIPTION' +- Move 'makeNamespace' to a separate file and include the original + copyright notice. + +namespace - 0.9.0 - 2012-09-13 +------------------------------ + Initial version. \ 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...> - 2012-09-19 16:57:18
|
Revision: 1612 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1612&view=rev Author: warnes Date: 2012-09-19 16:57:08 +0000 (Wed, 19 Sep 2012) Log Message: ----------- Move makeNamespace function into a separate file and include the original copyright notice. Modified Paths: -------------- trunk/namespace/R/namespace.R Added Paths: ----------- trunk/namespace/R/makeNamespace.R Added: trunk/namespace/R/makeNamespace.R =================================================================== --- trunk/namespace/R/makeNamespace.R (rev 0) +++ trunk/namespace/R/makeNamespace.R 2012-09-19 16:57:08 UTC (rev 1612) @@ -0,0 +1,46 @@ +# Copy of function defined inside of base::loadNamespace() in +# The R package source at src/library/base/R/namespace.R, +# Part of the R package, http://www.R-project.org +# +# Copyright (C) 1995-2012 The R Core Team +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# A copy of the GNU General Public License is available at +# http://www.r-project.org/Licenses/ + +# [NB: Other comments and code omitted] + +makeNamespace <- function(name, version = NULL, lib = NULL) { + impenv <- new.env(parent = .BaseNamespaceEnv, hash = TRUE) + attr(impenv, "name") <- paste("imports", name, sep=":") + env <- new.env(parent = impenv, hash = TRUE) + name <- as.character(as.name(name)) + version <- as.character(version) + info <- new.env(hash = TRUE, parent = baseenv()) + assign(".__NAMESPACE__.", info, envir = env) + assign("spec", c(name = name,version = version), envir = info) + setNamespaceInfo(env, "exports", new.env(hash = TRUE, parent = baseenv())) + dimpenv <- new.env(parent = baseenv(), hash = TRUE) + attr(dimpenv, "name") <- paste("lazydata", name, sep=":") + setNamespaceInfo(env, "lazydata", dimpenv) + setNamespaceInfo(env, "imports", list("base" = TRUE)) + ## this should be an absolute path + setNamespaceInfo(env, "path", + normalizePath(file.path(lib, name), "/", TRUE)) + setNamespaceInfo(env, "dynlibs", NULL) + setNamespaceInfo(env, "S3methods", matrix(NA_character_, 0L, 3L)) + assign(".__S3MethodsTable__.", + new.env(hash = TRUE, parent = baseenv()), + envir = env) + registerNamespace(name, env) + env +} Modified: trunk/namespace/R/namespace.R =================================================================== --- trunk/namespace/R/namespace.R 2012-09-13 23:54:38 UTC (rev 1611) +++ trunk/namespace/R/namespace.R 2012-09-19 16:57:08 UTC (rev 1612) @@ -56,30 +56,3 @@ return(getNamespace(name)) } } - -## Copy of function defined inside of base::loadNamespace -makeNamespace <- function(name, version = NULL, lib = NULL) { - impenv <- new.env(parent = .BaseNamespaceEnv, hash = TRUE) - attr(impenv, "name") <- paste("imports", name, sep=":") - env <- new.env(parent = impenv, hash = TRUE) - name <- as.character(as.name(name)) - version <- as.character(version) - info <- new.env(hash = TRUE, parent = baseenv()) - assign(".__NAMESPACE__.", info, envir = env) - assign("spec", c(name = name,version = version), envir = info) - setNamespaceInfo(env, "exports", new.env(hash = TRUE, parent = baseenv())) - dimpenv <- new.env(parent = baseenv(), hash = TRUE) - attr(dimpenv, "name") <- paste("lazydata", name, sep=":") - setNamespaceInfo(env, "lazydata", dimpenv) - setNamespaceInfo(env, "imports", list("base" = TRUE)) - ## this should be an absolute path - setNamespaceInfo(env, "path", - normalizePath(file.path(lib, name), "/", TRUE)) - setNamespaceInfo(env, "dynlibs", NULL) - setNamespaceInfo(env, "S3methods", matrix(NA_character_, 0L, 3L)) - assign(".__S3MethodsTable__.", - new.env(hash = TRUE, parent = baseenv()), - envir = env) - registerNamespace(name, env) - env -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |