From noreply at r-forge.r-project.org Mon Jun 5 21:20:03 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:20:03 +0200 (CEST) Subject: [R-gregmisc-commits] r2148 - in pkg/gdata: . R man Message-ID: <20170605192003.195B7188ABA@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:20:02 +0200 (Mon, 05 Jun 2017) New Revision: 2148 Modified: pkg/gdata/NAMESPACE pkg/gdata/R/update.data.frame.R pkg/gdata/R/update.list.R pkg/gdata/man/update.list.Rd Log: Drop 'update.data.frame' until there is time to work on it. Modified: pkg/gdata/NAMESPACE =================================================================== --- pkg/gdata/NAMESPACE 2017-05-24 22:09:12 UTC (rev 2147) +++ pkg/gdata/NAMESPACE 2017-06-05 19:20:02 UTC (rev 2148) @@ -44,7 +44,7 @@ trimSum, unmatrix, update.list, - update.data.frame, + #update.data.frame, upperTriangle, "upperTriangle<-", wideByFactor, @@ -171,4 +171,4 @@ # update methods for list, data.frame S3method(update, list) -S3method(update, data.frame) +#S3method(update, data.frame) Modified: pkg/gdata/R/update.data.frame.R =================================================================== --- pkg/gdata/R/update.data.frame.R 2017-05-24 22:09:12 UTC (rev 2147) +++ pkg/gdata/R/update.data.frame.R 2017-06-05 19:20:02 UTC (rev 2148) @@ -1,33 +1,48 @@ -# This function replace rows in 'x' by corresponding rows in 'y' the have -# the same value for 'by' -update.data.frame <- function(x, y, by, by.x=by, by.y=by, append=TRUE, verbose=TRUE, ...) -{ - retval <- x - x.by <- x[[by.x]] - y.by <- y[[by.y]] - - matches.x <- match(y.by, x.by) - matches.y <- which(!is.na(matches.x)) - nomatch.y <- which(is.na(matches.x)) - matches.x <- matches.x[!is.na(matches.x)] - - if(length(matches.x)>0) - retval[matches.x, ] <- y[matches.y,] - - if(length(nomatch.y) && append) - retval <- rbind(retval, y[nomatch.y,]) - - if(verbose) - { - cat("\n") - cat("Number of rows in x :", nrow(x), "\n") - cat("Number of rows in y :", nrow(y), "\n") - cat("\n") - cat("Number of rows replaced :", length(matches.x), "\n") - cat("Number of rows appended :", length(nomatch.y), "\n") - cat("\n") - cat("Number of rows in result:", nrow(retval), "\n") - cat("\n") - } - retval -} +# # This function replace rows in 'object' by corresponding rows in 'new' that have +# # the same value for 'by' +# update.data.frame <- function(object, +# new, +# by, +# by.object=by, +# by.new=by, +# append=TRUE, +# verbose=TRUE, +# ...) +# { +# retval <- object +# +# if(length(by.object)>1) +# stop("'by.object' can specify at most one column") +# +# if(length(by.new)>1) +# stop("'by.new' can specify at most one column") +# +# +# object.by <- object[[by.object]] +# new.by <- new [[by.new ]] +# +# matches.object <- match(new.by, object.by) +# matches.new <- which(!is.na(matches.object)) +# nomatch.new <- which(is.na(matches.object)) +# matches.object <- matches.object[!is.na(matches.object)] +# +# if(length(matches.object)>0) +# retval[matches.object, ] <- new[matches.new,] +# +# if(length(nomatch.new) && append) +# retval <- rbind(retval, new[nomatch.new,]) +# +# if(verbose) +# { +# cat("\n") +# cat("Number of rows in object:", nrow(object), "\n") +# cat("Number of rows in new :", nrow(new), "\n") +# cat("\n") +# cat("Number of rows replaced :", length(matches.object), "\n") +# cat("Number of rows appended :", length(nomatch.new), "\n") +# cat("\n") +# cat("Number of rows in result:", nrow(retval), "\n") +# cat("\n") +# } +# retval +# } Modified: pkg/gdata/R/update.list.R =================================================================== --- pkg/gdata/R/update.list.R 2017-05-24 22:09:12 UTC (rev 2147) +++ pkg/gdata/R/update.list.R 2017-06-05 19:20:02 UTC (rev 2148) @@ -1,7 +1,10 @@ ## this function updates the elements of list 'object' to contain all of the elements ## of 'new', overwriting elements with the same name, and (optionally) copying unnamed ## elements. -update.list <- function(object, new, unnamed=FALSE, ...) +update.list <- function(object, + new, + unnamed=FALSE, + ...) { retval <- object @@ -17,4 +20,5 @@ } retval -} \ No newline at end of file +} + Modified: pkg/gdata/man/update.list.Rd =================================================================== --- pkg/gdata/man/update.list.Rd 2017-05-24 22:09:12 UTC (rev 2147) +++ pkg/gdata/man/update.list.Rd 2017-06-05 19:20:02 UTC (rev 2148) @@ -1,30 +1,49 @@ \name{update.list} +%%\alias{update} \alias{update.list} -\alias{update.data.frame} +%%\alias{update.data.frame} \title{ Update the elements of a list } \description{ Function to update the elements of a list to contain all of the named elements - of a new list, overwriting elements with the same name, and (optionally) copying unnamed - elements. + of a new list, overwriting elements with the same name, and (optionally) copying + unnamed elements. } \usage{ -update.list(object, new, unnamed=FALSE, ...) -\method{update}{list}(object, new, unnamed=FALSE, ...) -\method{update}{data.frame}(object, new, unnamed=FALSE, ...) +%%update(object, +%% ...) +\method{update}{list}(object, + new, + unnamed=FALSE, + ...) +%%\method{update}{data.frame}(object, +%% new, +%% by, +%% by.object=by, +%% by.new=by, +%% append=TRUE, +%% verbose=TRUE, +%% unnamed=FALSE, +%% ...) } \arguments{ - \item{object}{List to be updated.} - \item{new}{List containing new elements.} - \item{unnamed}{Logical. If \code{TRUE}, unnamed elements of \code{new} will be appended to \code{object}} + \item{object}{Object to be updated.} + \item{new}{List or dataframe containing new elements.} + \item{unnamed}{Logical. If \code{TRUE}, unnamed elements + of \code{new} will be appended to \code{object}.} +%% \item{by, by.object, by,new}{For dataframe objects, rows of \code{object} +%% will be replaced by rows of \code{new} that have the same value +%% for this \em{one} column. (See examples below for an example.) } +%% \item{verbose}{Display details of changes performed.} \item{...}{optional method arguments (ignored)} } \note{ This method can be called directly, or as via the S3 base method for \code{update}. } -\value{ -A constructed from the elements of \code{object}, with named elements of \code{new} replacing corresponding named elements from \code{object}, and non-corresponding elements of \code{new} appended. If \code{unnamed=TRUE}, unnamed elements of \code{new} will be appended. +\value{A new list constructed from the elements of \code{object} by merging the elements of \code{old} and \code{new} with named items of \code{new} replacing the corresponding elements of \code{old}. Unnamed elements of \code{new} will be appened unless \code{unnamed=FALSE}. + +%%For dataframe objects, entire columns are replaced unless \code{by}, \code{by.object}, or \code{by.new} are supplied, in which case replacement only occures for rows with matching values for the columns listed by these parameters. The single argument \code{by} can by used to provides column names for that are common to both \code{old} and \code{new} objects, while \code{by.old} and \cody{by.new} specify column names specific to each object. } \author{ Gregory R. Warnes \email{greg at warnes.net} @@ -43,6 +62,16 @@ newer <- list(b="purple", 7, 8, 9) update(older, newer) # ignores unnamed elements of newer update(older, newer, unnamed=TRUE) # appends unnamed elements of newer + +%%data(iris) +%%iris$Species <- as.character(iris$Species) +%%df.old <- cbind(iris[1:5,], letters=1:5) +%%df.new <- df.old[3:5,] +%%df.new$Petal.Width <- df.new$Petal.Width + 0.1 +%% +%%df.old +%%df.new +%%update(df.old, df.new, by=c(letters)) } \keyword{data} \keyword{manip} From noreply at r-forge.r-project.org Mon Jun 5 21:22:08 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:22:08 +0200 (CEST) Subject: [R-gregmisc-commits] r2149 - pkg/gdata/man Message-ID: <20170605192208.4A87F188DE4@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:22:07 +0200 (Mon, 05 Jun 2017) New Revision: 2149 Modified: pkg/gdata/man/trim.Rd Log: Add reference to 'new' base function 'trimws'. Modified: pkg/gdata/man/trim.Rd =================================================================== --- pkg/gdata/man/trim.Rd 2017-06-05 19:20:02 UTC (rev 2148) +++ pkg/gdata/man/trim.Rd 2017-06-05 19:22:07 UTC (rev 2149) @@ -34,8 +34,8 @@ } \author{Gregory R. Warnes \email{greg at warnes.net} with contributions by Gregor Gorjanc} -\seealso{ \code{\link[base]{sub}}, \code{\link[base]{gsub}} as well as - argument \code{strip.white} in \code{\link{read.table}} and +\seealso{ \code{\link[base]{trimws}}, \code{\link[base]{sub}},\code{\link[base]{gsub}} +as well as argument \code{strip.white} in \code{\link{read.table}} and \code{\link{reorder.factor}} } \examples{ From noreply at r-forge.r-project.org Mon Jun 5 21:23:11 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:23:11 +0200 (CEST) Subject: [R-gregmisc-commits] r2150 - pkg/gdata/R Message-ID: <20170605192311.3E444188DE4@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:23:10 +0200 (Mon, 05 Jun 2017) New Revision: 2150 Modified: pkg/gdata/R/startsWith.R Log: gdata::startsWith() now uses base::startsWith() to do the actual comparison, after hanlding ignore.case and trim arguments. Modified: pkg/gdata/R/startsWith.R =================================================================== --- pkg/gdata/R/startsWith.R 2017-06-05 19:22:07 UTC (rev 2149) +++ pkg/gdata/R/startsWith.R 2017-06-05 19:23:10 UTC (rev 2150) @@ -1,10 +1,14 @@ startsWith <- function(str, pattern, trim=FALSE, ignore.case=FALSE) { if(trim) str <- trim(str) + if(ignore.case) { str <- toupper(str) pattern <- toupper(pattern) - } - substr(str,start=1,stop=nchar(pattern))==pattern + } + + #substr(str,start=1,stop=nchar(pattern))==pattern + + base::startsWith(str, pattern) } From noreply at r-forge.r-project.org Mon Jun 5 21:27:12 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:27:12 +0200 (CEST) Subject: [R-gregmisc-commits] r2151 - pkg/gdata/inst/doc Message-ID: <20170605192713.12EE6188DF3@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:27:12 +0200 (Mon, 05 Jun 2017) New Revision: 2151 Removed: pkg/gdata/inst/doc/Rnews.sty Log: Remove obsolete Rnews.sty file from inst/doc. Deleted: pkg/gdata/inst/doc/Rnews.sty =================================================================== --- pkg/gdata/inst/doc/Rnews.sty 2017-06-05 19:23:10 UTC (rev 2150) +++ pkg/gdata/inst/doc/Rnews.sty 2017-06-05 19:27:12 UTC (rev 2151) @@ -1,204 +0,0 @@ -%% -%% This is file `Rnews.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% Rnews.dtx (with options: `package') -%% -%% IMPORTANT NOTICE: -%% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from Rnews.sty. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file Rnews.dtx. -%% -%% This generated file may be distributed as long as the -%% original source files, as listed above, are part of the -%% same distribution. (The sources need not necessarily be -%% in the same archive or directory.) -\def\fileversion{v0.3.6} -\def\filename{Rnews} -\def\filedate{2002/06/02} -\def\docdate {2001/10/31} -%% -%% Package `Rnews' to use with LaTeX2e -%% Copyright (C) 2001--2002 by the R Core Development Team -%% Please report errors to KH or FL -%% -%% -*- LaTeX -*- -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{\filename}[\filedate\space\fileversion\space - Rnews package] -\typeout{Package: `\filename\space\fileversion \@spaces <\filedate>'} -\typeout{English documentation as of <\docdate>} -\RequirePackage{ifthen} -\newboolean{Rnews at driver} -\DeclareOption{driver}{\setboolean{Rnews at driver}{true}} -\DeclareOption*{\PackageWarning{\filename}{Unknown option - `\CurrentOption'}} -\ProcessOptions\relax -\ifthenelse{\boolean{Rnews at driver}}{}{ -\RequirePackage{multicol,graphicx,color,fancyhdr,hyperref} -\newcommand{\volume}[1]{\def\Rnews at volume{#1}} -\newcommand{\volnumber}[1]{\def\Rnews at number{#1}} -\renewcommand{\date}[1]{\def\Rnews at date{#1}} -\setcounter{secnumdepth}{-1} -\renewcommand{\author}[1]{\def\Rnews at author{#1}} -\renewcommand{\title}[1]{\def\Rnews at title{#1}} -\newcommand{\subtitle}[1]{\def\Rnews at subtitle{#1}} -\newenvironment{article}{% - \author{}\title{}\subtitle{}}{\end{multicols}} -\renewcommand{\maketitle}{ - \begin{multicols}{2}[\chapter{\Rnews at title}\refstepcounter{chapter}][3cm] - \ifx\empty\Rnews at subtitle\else\noindent\textbf{\Rnews at subtitle} - \par\nobreak\addvspace{\baselineskip}\fi - \ifx\empty\Rnews at author\else\noindent\textit{\Rnews at author} - \par\nobreak\addvspace{\baselineskip}\fi - \@afterindentfalse\@nobreaktrue\@afterheading} -\renewcommand\chapter{\secdef\Rnews at chapter\@schapter} -\providecommand{\nohyphens}{% - \hyphenpenalty=10000\exhyphenpenalty=10000\relax} -\newcommand{\Rnews at chapter}{% - \renewcommand{\@seccntformat}[1]{}% - \@startsection{chapter}{0}{0mm}{% - -2\baselineskip \@plus -\baselineskip \@minus -.2ex}{\p@}{% - \normalfont\Huge\bfseries\raggedright}} -\renewcommand*\l at chapter{\@dottedtocline{0}{0pt}{1em}} -\def\@schapter#1{\section*#1} -\renewenvironment{figure}[1][]{% - \def\@captype{figure} - \noindent - \begin{minipage}{\columnwidth}}{% - \end{minipage}\par\addvspace{\baselineskip}} -\renewcommand{\theequation}{\@arabic\c at equation} -\def\equation{% - \let\refstepcounter\H at refstepcounter - \H at equation - \def\newname{\arabic{chapter}.\theequation}% - \let\theHequation\newname% - \hyper at makecurrent{equation}% - \Hy at raisedlink{\hyper at anchorstart{\@currentHref}}% - \let\refstepcounter\new at refstepcounter}% -\def\endequation{\Hy at raisedlink{\hyper at anchorend}\H at endequation} -\renewcommand{\thefigure}{\@arabic\c at figure} -\renewcommand{\thetable}{\@arabic\c at table} -\renewcommand{\contentsname}{Contents of this issue:} -\renewcommand\tableofcontents{% - \section*{\contentsname - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% - \@starttoc{toc}} -\renewcommand{\titlepage}{% - \noindent - \rule{\textwidth}{1pt}\\[-.8\baselineskip] - \rule{\textwidth}{.5pt} - \begin{center} - \includegraphics[height=2cm]{Rlogo}\hspace{7mm} - \fontsize{2cm}{2cm}\selectfont - News - \end{center} - The Newsletter of the R Project\hfill - Volume \Rnews at volume/\Rnews at number, \Rnews at date\\[-.5\baselineskip] - \rule{\textwidth}{.5pt}\\[-.8\baselineskip] - \rule{\textwidth}{1pt} - \vspace{1cm} - \fancyhf{} - \fancyhead[L]{Vol.~\Rnews at volume/\Rnews at number, \Rnews at date} - \fancyhead[R]{\thepage} - \fancyfoot[L]{R News} - \fancyfoot[R]{ISSN 1609-3631} - \thispagestyle{empty} - \begin{bottombox} - \begin{multicols}{2} - \setcounter{tocdepth}{0} - \tableofcontents - \setcounter{tocdepth}{2} - \end{multicols} - \end{bottombox}} -\setlength{\textheight}{250mm} -\setlength{\topmargin}{-10mm} -\setlength{\textwidth}{17cm} -\setlength{\oddsidemargin}{-6mm} -\setlength{\columnseprule}{.1pt} -\setlength{\columnsep}{20pt} -\RequirePackage{ae,mathpple} -\RequirePackage[T1]{fontenc} -\renewcommand{\rmdefault}{ppl} -\renewcommand{\sfdefault}{aess} -\renewcommand{\ttdefault}{aett} -\definecolor{Red}{rgb}{0.7,0,0} -\definecolor{Blue}{rgb}{0,0,0.8} -\definecolor{hellgrau}{rgb}{0.55,0.55,0.55} -\newcommand{\R}{R} -\newcommand{\address}[1]{\addvspace{\baselineskip}\noindent\emph{#1}} -\newcommand{\email}[1]{\href{mailto:#1}{\normalfont\texttt{#1}}} -\newsavebox{\Rnews at box} -\newlength{\Rnews at len} -\newenvironment{bottombox}{% - \begin{figure*}[b] - \begin{center} - \noindent - \begin{lrbox}{\Rnews at box} - \begin{minipage}{0.99\textwidth}}{% - \end{minipage} - \end{lrbox} - \addtolength{\Rnews at len}{\fboxsep} - \addtolength{\Rnews at len}{\fboxrule} - \hspace*{-\Rnews at len}\fbox{\usebox{\Rnews at box}} - \end{center} - \end{figure*}} -\RequirePackage{verbatim} -\def\boxedverbatim{% - \def\verbatim at processline{% - {\setbox0=\hbox{\the\verbatim at line}% - \hsize=\wd0 \the\verbatim at line\par}}% - \@minipagetrue - \@tempswatrue - \setbox0=\vbox - \bgroup\small\verbatim -} -\def\endboxedverbatim{% - \endverbatim - \unskip\setbox0=\lastbox - \egroup - \fbox{\box0} -} -\pagestyle{fancy} -} % \ifthenelse{\boolean{Rnews at driver}} -\newcommand\code{\bgroup\@codex} -\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup} -\newcommand{\kbd}[1]{{\normalfont\texttt{#1}}} -\newcommand{\key}[1]{{\normalfont\texttt{\uppercase{#1}}}} -\newcommand\samp{`\bgroup\@noligs\@sampx} -\def\@sampx#1{{\normalfont\texttt{#1}}\egroup'} -\newcommand{\var}[1]{{\normalfont\textsl{#1}}} -\let\env=\code -\newcommand{\file}[1]{{`\normalfont\textsf{#1}'}} -\let\command=\code -\let\option=\samp -\newcommand{\dfn}[1]{{\normalfont\textsl{#1}}} -\newcommand{\acronym}[1]{{\normalfont\textsc{\lowercase{#1}}}} -\newcommand{\strong}[1]{{\normalfont\fontseries{b}\selectfont #1}} -\let\pkg=\strong -\RequirePackage{alltt} -\newenvironment{example}{\begin{alltt}}{\end{alltt}} -\newenvironment{smallexample}{\begin{alltt}\small}{\end{alltt}} -\newenvironment{display}{\list{}{}\item\relax}{\endlist} -\newenvironment{smallverbatim}{\small\verbatim}{\endverbatim} -\providecommand{\operatorname}[1]{% - \mathop{\operator at font#1}\nolimits} -\renewcommand{\P}{% - \mathop{\operator at font I\hspace{-1.5pt}P\hspace{.13pt}}} -\newcommand{\E}{% - \mathop{\operator at font I\hspace{-1.5pt}E\hspace{.13pt}}} -\newcommand{\VAR}{\operatorname{var}} -\newcommand{\COV}{\operatorname{cov}} -\newcommand{\COR}{\operatorname{cor}} -\RequirePackage{amsfonts} -\endinput -%% -%% End of file `Rnews.sty'. From noreply at r-forge.r-project.org Mon Jun 5 21:58:20 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:58:20 +0200 (CEST) Subject: [R-gregmisc-commits] r2152 - in pkg/gdata: . tests vignettes Message-ID: <20170605195820.6BC56188E3D@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:58:19 +0200 (Mon, 05 Jun 2017) New Revision: 2152 Modified: pkg/gdata/DESCRIPTION pkg/gdata/tests/test.humanReadable.Rout.save pkg/gdata/tests/test.read.xls.Rout.save pkg/gdata/tests/test.reorder.factor.Rout.save pkg/gdata/tests/tests.write.fwf.Rout.save pkg/gdata/vignettes/mapLevels.Rnw Log: Update package version and stored test output. Modified: pkg/gdata/DESCRIPTION =================================================================== --- pkg/gdata/DESCRIPTION 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/DESCRIPTION 2017-06-05 19:58:19 UTC (rev 2152) @@ -23,8 +23,8 @@ Depends: R (>= 2.3.0) SystemRequirements: perl (>= 5.10.0) Imports: gtools, stats, methods, utils -Version: 2.17.0 -Date: 2015-07-02 +Version: 2.18.0 +Date: 2017-05-05 Author: Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others Modified: pkg/gdata/tests/test.humanReadable.Rout.save =================================================================== --- pkg/gdata/tests/test.humanReadable.Rout.save 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/tests/test.humanReadable.Rout.save 2017-06-05 19:58:19 UTC (rev 2152) @@ -1,6 +1,6 @@ -R version 3.2.0 (2015-04-16) -- "Full of Ingredients" -Copyright (C) 2015 The R Foundation for Statistical Computing +R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" +Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -30,6 +30,10 @@ object.size +The following object is masked from 'package:base': + + startsWith + > > options(humanReadable=FALSE) > @@ -235,4 +239,4 @@ > > proc.time() user system elapsed - 0.421 0.052 0.464 + 0.301 0.044 0.361 Modified: pkg/gdata/tests/test.read.xls.Rout.save =================================================================== --- pkg/gdata/tests/test.read.xls.Rout.save 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/tests/test.read.xls.Rout.save 2017-06-05 19:58:19 UTC (rev 2152) @@ -1,6 +1,6 @@ -R version 3.2.0 (2015-04-16) -- "Full of Ingredients" -Copyright (C) 2015 The R Foundation for Statistical Computing +R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" +Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -30,6 +30,10 @@ object.size +The following object is masked from 'package:base': + + startsWith + > > if ( ! 'XLSX' %in% xlsFormats() ) + { @@ -904,4 +908,4 @@ > > proc.time() user system elapsed - 13.495 0.834 14.549 + 10.455 0.880 12.534 Modified: pkg/gdata/tests/test.reorder.factor.Rout.save =================================================================== --- pkg/gdata/tests/test.reorder.factor.Rout.save 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/tests/test.reorder.factor.Rout.save 2017-06-05 19:58:19 UTC (rev 2152) @@ -1,6 +1,6 @@ -R version 3.2.0 (2015-04-16) -- "Full of Ingredients" -Copyright (C) 2015 The R Foundation for Statistical Computing +R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" +Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -41,6 +41,10 @@ object.size +The following object is masked from 'package:base': + + startsWith + > > ( m2 <- reorder(m, X=c(3, 2, 1)) ) [1] a b c @@ -53,4 +57,4 @@ > > proc.time() user system elapsed - 0.341 0.046 0.381 + 0.262 0.043 0.321 Modified: pkg/gdata/tests/tests.write.fwf.Rout.save =================================================================== --- pkg/gdata/tests/tests.write.fwf.Rout.save 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/tests/tests.write.fwf.Rout.save 2017-06-05 19:58:19 UTC (rev 2152) @@ -1,6 +1,6 @@ -R version 3.2.0 (2015-04-16) -- "Full of Ingredients" -Copyright (C) 2015 The R Foundation for Statistical Computing +R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" +Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -37,6 +37,10 @@ object.size +The following object is masked from 'package:base': + + startsWith + > > ## --- Test data --- > @@ -231,4 +235,4 @@ > > proc.time() user system elapsed - 0.426 0.048 0.462 + 0.333 0.044 0.392 Modified: pkg/gdata/vignettes/mapLevels.Rnw =================================================================== --- pkg/gdata/vignettes/mapLevels.Rnw 2017-06-05 19:27:12 UTC (rev 2151) +++ pkg/gdata/vignettes/mapLevels.Rnw 2017-06-05 19:58:19 UTC (rev 2152) @@ -12,6 +12,7 @@ \SweaveOpts{strip.white=all, keep.source=TRUE} \begin{document} +\SweaveOpts{concordance=TRUE} \begin{article} From noreply at r-forge.r-project.org Mon Jun 5 21:59:20 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 21:59:20 +0200 (CEST) Subject: [R-gregmisc-commits] r2153 - pkg/gdata Message-ID: <20170605195920.4AAE0188E3D@r-forge.r-project.org> Author: warnes Date: 2017-06-05 21:59:19 +0200 (Mon, 05 Jun 2017) New Revision: 2153 Added: pkg/gdata/.Rbuildignore Log: Specify which file patterns to ignore when building R package file. Added: pkg/gdata/.Rbuildignore =================================================================== --- pkg/gdata/.Rbuildignore (rev 0) +++ pkg/gdata/.Rbuildignore 2017-06-05 19:59:19 UTC (rev 2153) @@ -0,0 +1,11 @@ +^.*\.Rproj$ # Automatically added by RStudio, +^\.Rproj\.user$ # used for temporary files. +^README\.Rmd$ # An Rmarkdown file used to generate README.md +^cran-comments\.md$ # Comments for CRAN submission +^NEWS\.md$ # A news file written in Markdown +^\.travis\.yml$ # Used for continuous integration testing with travis + +\.aux$ +\.tex$ +\.bbl$ +\.rds$ From noreply at r-forge.r-project.org Mon Jun 5 22:05:28 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 22:05:28 +0200 (CEST) Subject: [R-gregmisc-commits] r2154 - pkg/gdata Message-ID: <20170605200528.16D32188E3D@r-forge.r-project.org> Author: warnes Date: 2017-06-05 22:05:26 +0200 (Mon, 05 Jun 2017) New Revision: 2154 Modified: pkg/gdata/DESCRIPTION Log: Fix type in DESCRIPTION date field. Modified: pkg/gdata/DESCRIPTION =================================================================== --- pkg/gdata/DESCRIPTION 2017-06-05 19:59:19 UTC (rev 2153) +++ pkg/gdata/DESCRIPTION 2017-06-05 20:05:26 UTC (rev 2154) @@ -24,7 +24,7 @@ SystemRequirements: perl (>= 5.10.0) Imports: gtools, stats, methods, utils Version: 2.18.0 -Date: 2017-05-05 +Date: 2017-06-05 Author: Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others From noreply at r-forge.r-project.org Mon Jun 5 23:27:05 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Jun 2017 23:27:05 +0200 (CEST) Subject: [R-gregmisc-commits] r2155 - in pkg: gdata/inst gmodels/inst Message-ID: <20170605212705.B7763188E70@r-forge.r-project.org> Author: warnes Date: 2017-06-05 23:27:05 +0200 (Mon, 05 Jun 2017) New Revision: 2155 Modified: pkg/gdata/inst/ChangeLog pkg/gmodels/inst/NEWS Log: Update NEWS and ChangeLog files for 2.18.0. Modified: pkg/gdata/inst/ChangeLog =================================================================== --- pkg/gdata/inst/ChangeLog 2017-06-05 20:05:26 UTC (rev 2154) +++ pkg/gdata/inst/ChangeLog 2017-06-05 21:27:05 UTC (rev 2155) @@ -1,3 +1,71 @@ +2017-06-05 warnes + + * [r2154] DESCRIPTION: Fix type in DESCRIPTION date field. + * [r2153] .Rbuildignore: Specify which file patterns to ignore when + building R package file. + * [r2152] DESCRIPTION, tests/test.humanReadable.Rout.save, + tests/test.read.xls.Rout.save, + tests/test.reorder.factor.Rout.save, + tests/tests.write.fwf.Rout.save, vignettes/mapLevels.Rnw: Update + package version and stored test output. + * [r2151] inst/doc/Rnews.sty: Remove obsolete Rnews.sty file from + inst/doc. + * [r2150] R/startsWith.R: gdata::startsWith() now uses + base::startsWith() to do the actual comparison, after hanlding + ignore.case and trim arguments. + * [r2149] man/trim.Rd: Add reference to 'new' base function + 'trimws'. + * [r2148] NAMESPACE, R/update.data.frame.R, R/update.list.R, + man/update.list.Rd: Drop 'update.data.frame' until there is time + to work on it. + +2016-08-12 warnes + + * [r2130] NAMESPACE: Add mv to exported namespace + +2016-05-31 warnes + + * [r2128] R/humanReadable.R: Fix typo that forced users of + humanReadable() to provide two elements to the 'justify' + argument. The correction allows a single value to be provided + which will be expanded to two internally. + +2016-02-05 warnes + + * [r2077] man/update.list.Rd: Add documentation for update() + data.frame method. + * [r2076] R/mv.R, man/mv.Rd: Add mv() function to rename an object. + +2016-02-03 warnes + + * [r2075] NAMESPACE: - Add update() methods list and data.frame - + Add 'first<-' and 'last<-' assignment methods + * [r2074] R/update.data.frame.R, R/update.list.R, + man/update.list.Rd: Add update() methods for lists and data + frames + * [r2073] R/first.R, man/first.Rd: Add assignment versions of + first() and last() + * [r2072] R/rename.vars.R: Improve logging and error reporting for + remove.vars() + +2015-10-15 warnes + + * [r2068] R/installXLSXsupport.R: Remove unused call to tempdir(). + +2015-07-22 warnes + + * [r2062] DESCRIPTION, NAMESPACE, + tests/test.humanReadable.Rout.save, tests/test.read.xls.R, + tests/test.read.xls.Rout.save, + tests/test.reorder.factor.Rout.save, + tests/tests.write.fwf.Rout.save: Renamed 'test' directory to + 'tests', commented out tests for lme4 which has a changed API + +2015-07-03 warnes + + * [r2056] DESCRIPTION, inst/ChangeLog, inst/NEWS: Update for gdata + 2.17.0 + 2015-06-29 warnes * [r2055] inst/ChangeLog: Update ChangeLog @@ -44,14 +112,11 @@ * [r1979] Update version requirement for R (>= 2.3.0) and perl (5.10.0). * [r1978] - first() and last() are now simply wrappers to - utils::head() and - utils::tail() with a default 'n=1' instead of 'n=6'. - - Move code for left() and right() into a separate file. + utils::head() and utils::tail() with a default 'n=1' instead of + 'n=6'. - Move code for left() and right() into a separate file. * [r1977] If arguments 'X' or 'FUN' is supplied to - reorder.factor(), mimic the - behavior of stats::reorder.default() rather than trying to call - it via - NextMethod. + reorder.factor(), mimic the behavior of stats::reorder.default() + rather than trying to call it via NextMethod. 2015-04-25 warnes @@ -87,8 +152,8 @@ * [r1953] Update NEWS and ChangeLog * [r1952] - write.fwf() now properly supports matrix objects, - including matrix - objects wihtout column names. (Reported by Carl Witthoft.) + including matrix objects wihtout column names. (Reported by Carl + Witthoft.) * [r1951] Remove 'use POSIX' from xls2csv.pl since it is no longer needed * [r1939] Update NEWS and ChangeLog @@ -138,9 +203,8 @@ * [r1880] Complete transition from Spreadsheet::XLSX to Spreadsheet::ParseXLSX * [r1879] Handle Excel files created on the Mac, where by default - Excel uses - 1904-01-01 as the baseline for dates, rather than the usual - 1900-01-01. + Excel uses 1904-01-01 as the baseline for dates, rather than the + usual 1900-01-01. * [r1878] Remove dotfiles * [r1877] Update for release * [r1876] Add test for handling fo very wide xls and xlsx files. @@ -154,8 +218,7 @@ 2014-04-05 warnes * [r1801] Apply same changes to NAToUnknown that were previously - applied to - unknownToNA for POSIXlt. + applied to unknownToNA for POSIXlt. * [r1800] Update NEWS with latest changes * [r1799] Call stats::nobs instead of stats:::nobs.default within gdata::nobs.default. This avoids R CMD check warning. @@ -181,8 +244,7 @@ * [r1784] Move unit test files back to inst/unitTests. Fix up runRUnitTests.R to work properly in the new location * [r1783] - For unit tests, don't check for equality of optional - POSIXlt - components. (Bug reported by Brian Ripley). + POSIXlt components. (Bug reported by Brian Ripley). * [r1782] Move unit test code into the (now) standard location 2014-03-19 arnima @@ -197,8 +259,7 @@ 2013-12-16 warnes * [r1757] Trim will now remove all types of leading/trailing - whitespace by using - the [:blank:] character class. + whitespace by using the [:blank:] character class. 2013-06-29 warnes @@ -241,24 +302,20 @@ * [r1617] Correct column names. Unit columns were reversed and misspelled. * [r1616] Add ignore.stderr to system command in sheetCmd() to - prevent stderr - messages from being included in the captured output from the perl - script. + prevent stderr messages from being included in the captured + output from the perl script. 2012-09-12 warnes * [r1606] Update for gdata 2.12.0 * [r1605] '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 - 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 + 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 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 will be removed entirely in a future version of gdata. * [r1604] Don't ignore .Rnw files, but do ignore .svn files. @@ -272,23 +329,17 @@ * [r1601] Update DESCRIPTION and NEWS for gdate 2.11.1. * [r1600] Add example for read.xls() that shows how to use the - fileEncoding - argument to read in latin-1 encoded data. + fileEncoding argument to read in latin-1 encoded data. * [r1599] Add XLSX test for latin-1 characters, and look for them - in their new - location in inst/xls/. + in their new location in inst/xls/. * [r1598] add XLSX version of latin-1.xls * [r1597] Add test file and code to ensure that read.xls() can - properly handle - files with alternative encodings. latin-1.xls contains each of - the - non-ascii latin-1 special characters in both the column headings - and - the body of the file. + properly handle files with alternative encodings. latin-1.xls + contains each of the non-ascii latin-1 special characters in both + the column headings and the body of the file. * [r1596] Change code to have R read the csv/tab data from the file - rather than - from the connetion we made, so that file encodings can be - properly handled. + rather than from the connetion we made, so that file encodings + can be properly handled. * [r1595] Always close the connection. 2012-08-13 warnes @@ -300,8 +351,7 @@ * [r1567] Update NEWS for 2.11.0 release. * [r1566] Bump version number and add SystemRequirements for perl. * [r1565] read.xls() and supporting functions now allow blank lines - to be - preserved, rather than skipped, by supplying the argument + to be preserved, rather than skipped, by supplying the argument "blank.lines.skip=FALSE". The underlying perl function has been extended to suppor this via an optional "-s" argument which, when present, *preserves* blank lines during the conversion. @@ -309,9 +359,8 @@ 2012-06-13 warnes * [r1564] - nobs.default needs to handle logical vectors in - addition to numeric - vectors. - - update DESCRIPTION and NEWS for 2.10.6. + addition to numeric vectors. - update DESCRIPTION and NEWS for + 2.10.6. * [r1563] nobs.default needs to handle logical as well as numeric vectors. @@ -332,15 +381,13 @@ 'stats::nobs'. * [r1549] Remove stray non-ASCII characters. * [r1548] The nobs() dispatch method must be defined in the gdata - namespace to - pick up the definition of gdata::nobs.default. + namespace to pick up the definition of gdata::nobs.default. * [r1547] Update DESCRIPTION and NEWS for 2.10.1 release. * [r1546] Define aliases for 'nobs' and 'nobs.lm' to support - backward - compatibility for packages depending on gdata. + backward compatibility for packages depending on gdata. * [r1545] Update DESCRIPTION and NEWS for 2.10.0 release - * [r1544] - Add manual page and NAMESPACE entry for startsWith(). - - Add 'ignore.case' argument to startsWith(). + * [r1544] - Add manual page and NAMESPACE entry for startsWith(). - + Add 'ignore.case' argument to startsWith(). * [r1543] Update to match new code. * [r1542] Replace non-ASCII characters. * [r1541] Add na.strings to read.xls call to convert "#DIV/0!" to @@ -355,11 +402,9 @@ * [r1538] Add .Rinstignore file to omit latex style and source files from distributed inst/doc directory. * [r1537] - Add NULL definition of MedUnits to avoid R CMD check - warning. - - Specify local environment when calling data() so that MedUnits - gets - defined in the function's environment rather than the global - environment. + warning. - Specify local environment when calling data() so that + MedUnits gets defined in the function's environment rather than + the global environment. * [r1536] Fix error in ls.funs() that occurs when there are no objects in the environment. * [r1535] Avoid warning by calling utils::object.size rather than @@ -368,8 +413,7 @@ 2012-05-31 warnes * [r1534] - Remove dispatch function 'nobs' and method 'nobs.lm' - since these are - now provided by the R 'stats' package. + since these are now provided by the R 'stats' package. 2012-05-04 warnes @@ -427,8 +471,8 @@ * [r1461] Update DEScription file for 2.8.1 release * [r1460] Update test output to match latest code * [r1459] Modify write.fwf() to capture and pass on additional - arguments for - write.table(). This resolves a bug reported by Jan Wijffels. + arguments for write.table(). This resolves a bug reported by Jan + Wijffels. 2010-11-01 arnima @@ -550,16 +594,12 @@ * [r1380] If only one sheet is present in the file, don't insert the sheet name into the filename * [r1379] Add additional test/example Excel files - * [r1378] Modify xls2csv.pl script to: - - Use tab-delimiter and .tsv or .tab extension if called with the - name - xls2tsv.pl or xls2tab.pl, respectively. This allows a single - source - file and two symlinks to be used intstead of maintaining several - almost-identical files. - - Allow selection of sheets by name - - Provide better error checking - - Other code improvements + * [r1378] Modify xls2csv.pl script to: - Use tab-delimiter and .tsv + or .tab extension if called with the name xls2tsv.pl or + xls2tab.pl, respectively. This allows a single source file and + two symlinks to be used intstead of maintaining several + almost-identical files. - Allow selection of sheets by name - + Provide better error checking - Other code improvements * [r1377] Add perl scripts to extract worksheet names and sheet count from Excel files @@ -581,12 +621,10 @@ - Move qQuote.ascii to a separate file - Bug Fix: xls2csv(), xls2tab() failed to pass the provided - 'perl' - parameter to xls2sep() + 'perl' parameter to xls2sep() - New Feature: xls2sep() (and hence xls2csv, xls2tab, and - read.xls) - now supports ftp URLs. + read.xls) now supports ftp URLs. 2009-12-06 arnima @@ -668,9 +706,8 @@ of rows. - write.fwf gains width argument. Unknown values can increase or - decrease - the width of the columns. Additional tests and documentation - fixes. + decrease the width of the columns. Additional tests and + documentation fixes. 2008-06-30 arnima @@ -685,21 +722,18 @@ * [r1268] Modifed read.xls() failed to return the converted data... fixed. * [r1267] Correct broken patch for open-office support - * [r1266] For read.xls() and xls2csv(): - - Implement more informative log messages when verbose=TRUE - - Quote temporary file name to avoid errors when calling perl to - do the work. - - Add better error messages, particularly when perl fails to - generate an - output .csv file. + * [r1266] For read.xls() and xls2csv(): - Implement more + informative log messages when verbose=TRUE - Quote temporary file + name to avoid errors when calling perl to do the work. - Add + better error messages, particularly when perl fails to generate + an output .csv file. Update version number in DESCRIPTION. 2008-05-12 warnes * [r1265] Patch to correct issue with OpenOffice-created XLS files. - Thanks to - Robert Burns for pointing out the patch at + Thanks to Robert Burns for pointing out the patch at http://rt.cpan.org/Public/Bug/Display.html?id=7206 2008-03-25 warnes @@ -759,17 +793,14 @@ 2007-07-22 arnima * [r1103] Reverted back to as.character(substitute(x)), so user can - run keep(x), - keep("x"), Args(x), and Args("x"). + run keep(x), keep("x"), Args(x), and Args("x"). 2007-07-21 arnima * [r1102] Changed as.character(substitute()) to - deparse(substitute()), following - help(substitute) recommendation. + deparse(substitute()), following help(substitute) recommendation. * [r1101] Changed as.character(substitute()) to - deparse(substitute()), following - help(substitute) recommendation. + deparse(substitute()), following help(substitute) recommendation. 2007-07-10 warnes @@ -791,8 +822,8 @@ * [r1041] Meaningful error message is given when requested object does not exist - * [r1040] is.* tests that return NA are not reported - is.what recursion is avoided + * [r1040] is.* tests that return NA are not reported is.what + recursion is avoided 2006-11-30 ggorjan @@ -891,9 +922,8 @@ 2006-01-03 warnes * [r839] Add resample() function, which generates a random sample - or - permutation from the elements of the supplied vector, even if the - vector has length 1. This avoide the problems caused by + or permutation from the elements of the supplied vector, even if + the vector has length 1. This avoide the problems caused by base::sample()'s special case for vectors of length 1, where it attempts to sample from 1:x. @@ -908,22 +938,18 @@ 2005-12-08 warnes * [r789] Andrew Burgess reported that interleave() converts - 1-column matrixes - to vectors and provided a patch. A slight modification of his - patch - has been applied. There is now a 'drop' argument, which controls - whether 'unnecessary' dimensions are dropped. The default is - FALSE. + 1-column matrixes to vectors and provided a patch. A slight + modification of his patch has been applied. There is now a 'drop' + argument, which controls whether 'unnecessary' dimensions are + dropped. The default is FALSE. 2005-12-04 warnes * [r779] Andrew Burgess reported that interleave() converts - 1-column matrixes - to vectors and provided a patch. A slight modification of his - patch - has been applied. There is now a 'drop' argument, which controls - whether 'unnecessary' dimensions are dropped. The default is - FALSE. + 1-column matrixes to vectors and provided a patch. A slight + modification of his patch has been applied. There is now a 'drop' + argument, which controls whether 'unnecessary' dimensions are + dropped. The default is FALSE. 2005-12-01 nj7w @@ -939,14 +965,12 @@ * [r716] Bump version number again to show that I fixed a bug. * [r715] Update version number * [r714] Remove explicit loading of gtools in examples, so that - failure to - import functions from gtools gets properly caught by running the - examples. + failure to import functions from gtools gets properly caught by + running the examples. * [r713] Add missing close-bracket * [r712] Add upperTriangle and friends * [r711] Add functions for extracting, modifying upper and lower - trianglular - components of matrices. + trianglular components of matrices. 2005-10-19 arnima @@ -980,20 +1004,12 @@ * [r631] updated documentation * [r630] ## Args() was using a different search path from args(), - e.g. - rep <- function(local) return(NULL) - args() - Args() - ## Fixed + e.g. rep <- function(local) return(NULL) args() Args() ## Fixed * [r629] ## is.what() was giving needless warnings for functions, - e.g. - is.what(plot) - ## Fixed + e.g. is.what(plot) ## Fixed * [r628] ## ll() was crashing if argument was a list of length - zero, e.g. - x <- list() - ll(x) - ## Fixed, and added sort.elements (see new help page) + zero, e.g. x <- list() ll(x) ## Fixed, and added sort.elements + (see new help page) 2005-06-09 nj7w @@ -1004,17 +1020,16 @@ 2005-06-07 nj7w * [r622] Reverting to the previous version of drop.levels.R by - replacing - sapply(...) with as.data.frame(lapply(...)) because sapply has - the undesirable effect of converting the object to a matrix, - which in turn coerces the factors to numeric. + replacing sapply(...) with as.data.frame(lapply(...)) because + sapply has the undesirable effect of converting the object to a + matrix, which in turn coerces the factors to numeric. 2005-05-13 nj7w * [r621] 1) Using dQuote.ascii function in read.xls as the new - version of dQuote doesn't work proprly with UTF-8 locale. - 2) Modified CrossTable.Rd usage in gmodels - 3) Modified heatmap.2 usage in gplots. + version of dQuote doesn't work proprly with UTF-8 locale. 2) + Modified CrossTable.Rd usage in gmodels 3) Modified heatmap.2 + usage in gplots. 2005-04-02 warnes @@ -1034,20 +1049,18 @@ 2005-03-09 warnes - * [r573] - Add ConvertMedUnits() plus documentation - - Add documentation for MedUnits data set. + * [r573] - Add ConvertMedUnits() plus documentation - Add + documentation for MedUnits data set. * [r572] Update MedUnits data file. * [r571] Don't need both .Rda and .tab forms of the data. * [r570] Add MedUnits data set, which provides conversions between - American - 'Conventional' and Standard Intertional (SI) medical units. + American 'Conventional' and Standard Intertional (SI) medical + units. 2005-03-01 warnes - * [r566] - Remove 'elem' call from ll example. - - Add note to 'elem' man page that it is depreciated and 'll' - should - be used instead. + * [r566] - Remove 'elem' call from ll example. - Add note to 'elem' + man page that it is depreciated and 'll' should be used instead. 2005-02-26 nj7w @@ -1070,8 +1083,7 @@ 2005-01-12 warnes * [r515] Add dependency on R 1.9.0+ to prevent poeple from - installing on old - versions of R which don't support namespaces. + installing on old versions of R which don't support namespaces. 2004-12-27 warnes @@ -1129,8 +1141,7 @@ * [r371] Moved from gregmisc/src/. * [r370] Remove the files in src, instead provide "pre-installed" - perl packages - in inst/perl. + perl packages in inst/perl. 2004-06-05 warnes @@ -1139,20 +1150,16 @@ * [r363] Fixes for Windows * [r362] Minor enhancment to read.xls example. * [r361] - Merge Makefile.win into Makefile. Makefile.win now just - redirects - to Makefile. - - Update xls2csv.bat and xls2csv shell script to correctly obtain - thier installion path and infer the location of the perl code and - libraries. - - The xls2csv.pl script now assumes that the libraries it needs - are - installed into the same directory where it is. + redirects to Makefile. - Update xls2csv.bat and xls2csv shell + script to correctly obtain thier installion path and infer the + location of the perl code and libraries. - The xls2csv.pl script + now assumes that the libraries it needs are installed into the + same directory where it is. 2004-06-04 warnes * [r360] More changes, indended to improve installation reliabilty - and to make - Makefile and Makefile.win as similar as possible. + and to make Makefile and Makefile.win as similar as possible. 2004-05-27 warnes @@ -1174,31 +1181,24 @@ * [r337] Add Args() function contributed by Arni Magnusson . * [r335] - Change to call perl directly rather than depending on - the installed - shell script. This should make the code more portable to - MS-Windows - systes. + the installed shell script. This should make the code more + portable to MS-Windows systes. - Add additional commants.. * [r332] Makefile now modifies xls2csv.bat xls2csv.pl and xls2csv - to contain an - explicit path to the perl script/libraries. + to contain an explicit path to the perl script/libraries. * [r330] R CMD build calls the clean target to purge build files - from the - source tree when packaging. To get use this behavior correctly, - I've - renamed the clean target to cleanup and distclean target to - clean. + from the source tree when packaging. To get use this behavior + correctly, I've renamed the clean target to cleanup and distclean + target to clean. * [r329] Add read.xls(), a function to read Microsoft Excel files - by - translating them to csv files via the xls2csv.pl script. + by translating them to csv files via the xls2csv.pl script. * [r326] More fixes. Seems to work now. 2004-05-24 warnes * [r325] Add files to enable inclusion and installation of - xls2csv.pl as part - of the package. + xls2csv.pl as part of the package. 2004-04-01 warnes @@ -1207,8 +1207,8 @@ 2004-03-26 warnes * [r307] Contents of package 'mva' moveed to 'stats'. - * [r298] - Fix is.what() for use under R 1.9.0 - - is.what() now uses is.* functions found in any attached frame + * [r298] - Fix is.what() for use under R 1.9.0 - is.what() now uses + is.* functions found in any attached frame 2004-01-21 warnes @@ -1217,14 +1217,12 @@ 2004-01-19 warnes * [r275] - Integrated (partial) patch submitted by Arni Magnusson - to clarify help text. - - Modifed code to use match.arg(). + to clarify help text. - Modifed code to use match.arg(). 2003-12-15 warnes * [r271] - Applied patch from Arni that fixed a bug that caused - env() to crash - if any environment was completely empty + env() to crash if any environment was completely empty 2003-12-03 warnes @@ -1244,8 +1242,8 @@ 2003-11-18 warnes - * [r224] - Convert from MS-Dos to Unix line endings. - - Reformat to 80 columns. + * [r224] - Convert from MS-Dos to Unix line endings. - Reformat to + 80 columns. 2003-11-17 warnes @@ -1260,21 +1258,18 @@ 2003-06-07 warnes * [r198] - Fixed error in examples. Had sqrt(var(x)/(n-1)) for the - standard - error of the mean instead of sqrt(var(x)/n). + standard error of the mean instead of sqrt(var(x)/n). 2003-05-23 warnes * [r197] - Fixed typos * [r196] - library() backported from 1.7-devel. This version of the - function - adds the "pos=" argument to specify where in the search path the - library should be placed. + function adds the "pos=" argument to specify where in the search + path the library should be placed. - updated .First.lib to use library(...pos=3) for MASS to avoid - the - 'genotype' data set in MASS from masking the genotype funciton in - genetics when it loads gregmisc + the 'genotype' data set in MASS from masking the genotype + funciton in genetics when it loads gregmisc - Added logit() inv.logit() matchcols() function and corresponding docs @@ -1287,17 +1282,15 @@ 2003-04-22 warnes * [r188] - The mva package (which is part of recommended) now - provides a - generic 'reorder' function. Consequently, the 'reorder' function - here has been renamed to 'reorder.factor'. + provides a generic 'reorder' function. Consequently, the + 'reorder' function here has been renamed to 'reorder.factor'. - Removed check of whether the argument is a factor object. 2003-03-03 warnes * [r165] - Updated to match reorder.Rd which was exetended to - handle factor - label names in addition to numeric indices. + handle factor label names in addition to numeric indices. * [r164] - Added handling of factor level names in addition to numeric indexes. @@ -1319,8 +1312,8 @@ 2002-03-26 warneg - * [r104] - Changed methods to include '...' to match the generic. - - Updated for version 0.5.1 + * [r104] - Changed methods to include '...' to match the generic. - + Updated for version 0.5.1 * [r102] Added ... to methods. * [r101] Updated to add ... parameter to function calls. * [r98] Initial checkin. @@ -1329,10 +1322,9 @@ 2002-02-21 warneg * [r87] - Fixed bug where row and column labels didn't always - correspond to the - contents. This only occured when a factor was used for by1 or by2 - and - the factors levels weren't in the default sort order. + correspond to the contents. This only occured when a factor was + used for by1 or by2 and the factors levels weren't in the default + sort order. 2002-02-20 warneg @@ -1348,9 +1340,8 @@ 2001-12-12 warneg * [r53] Added omitted documentaton for 'info' parameter. Changed - example code - not to use 'Orthodont' data set so that the nlme package is not - required. + example code not to use 'Orthodont' data set so that the nlme + package is not required. 2001-12-08 warneg @@ -1363,16 +1354,14 @@ * [r44] Added attribution. * [r43] Added proper attribution to Don MacQueen. * [r39] Initial checkin. Unfortunately, I've lost the email of the - person who - sent this to me. I'll credit him/her when I find out who it was! + person who sent this to me. I'll credit him/her when I find out + who it was! * [r38] Initial checkin 2001-12-05 warneg * [r34] - Renamed 'concat' function to 'combine' to avoid name - conflict with - an existing S-Plus function. + conflict with an existing S-Plus function. * [r32] - Changed function name 'concat' to 'combine' and renamed - concat.Rd to - combine.Rd + concat.Rd to combine.Rd Modified: pkg/gmodels/inst/NEWS =================================================================== --- pkg/gmodels/inst/NEWS 2017-06-05 20:05:26 UTC (rev 2154) +++ pkg/gmodels/inst/NEWS 2017-06-05 21:27:05 UTC (rev 2155) @@ -1,8 +1,29 @@ -Version 2.16.0 - 2014-07-24 +Version 2.18.0 - 2017-06-05 --------------------------- +New functions: + +- Add update.list() function to replace named elements a list. +- Add mv() function to rename an object. +- Add first(), last(), 'first<-'() and 'last<-'() functions to extract + or replace first or last vector/list elements. + New features: +- Add 'byrow' argument to lowerTriangle()/upperTriangle() functions. + +Other User-visible Changes: + +- humanReadable() now properly handles a single value for the argument 'justify'. +- Improve logging and error reporting for remove.vars() +- read.xls() now handles latin-1 files properly on MS-Windows. +- write.fwf() now properly handles matrix arguments. + +Version 2.16.0 - 2015-04-22 +--------------------------- + +New features: + - The estimable() function now returns objects that are of class 'estimable'. @@ -41,7 +62,7 @@ Bug fixes: - Update est.mer() to work with recent versions of lme4 which changed - 'mer' objects from S3 to S4 class + 'mer' objects from S3 to S4 class - Changes to pass new R CMD check tests @@ -113,7 +134,7 @@ - fix various code/doc inconsistencies - Problem: estimable() was failing for lmer objects. - Solution: + Solution: - Create a generic estimable() - Move old function to estimable.default() - Add estimable.lmer() to the exported methods list in NAMESPACE @@ -135,8 +156,8 @@ function provided by Randall C Johnson. It is now possible to do things like: estimable(reg, c("xB"=1,"xD"=-1)) - instead of: - estimable(reg, c( 0, 1, 0, -1)) + instead of: + estimable(reg, c( 0, 1, 0, -1)) which should make estimable() much easier to use for large models. Version 2.1.0 From noreply at r-forge.r-project.org Tue Jun 6 19:16:22 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 6 Jun 2017 19:16:22 +0200 (CEST) Subject: [R-gregmisc-commits] r2156 - pkg/gdata/inst Message-ID: <20170606171622.61AF4187733@r-forge.r-project.org> Author: warnes Date: 2017-06-06 19:16:21 +0200 (Tue, 06 Jun 2017) New Revision: 2156 Modified: pkg/gdata/inst/NEWS Log: Update NEWS file for 2.18.0 Modified: pkg/gdata/inst/NEWS =================================================================== --- pkg/gdata/inst/NEWS 2017-06-05 21:27:05 UTC (rev 2155) +++ pkg/gdata/inst/NEWS 2017-06-06 17:16:21 UTC (rev 2156) @@ -1,3 +1,24 @@ +Version 2.18.0 (2017-06-05) +--------------------------- + +New functions: + +- Add update.list() function to replace named elements a list. +- Add mv() function to rename an object. +- Add first(), last(), 'first<-'() and 'last<-'() functions to extract + or replace first or last vector/list elements. + +New features: + +- Add 'byrow' argument to lowerTriangle()/upperTriangle() functions. + +Other User-visible Changes: + +- humanReadable() now properly handles a single value for the argument 'justify'. +- Improve logging and error reporting for remove.vars() +- read.xls() now handles latin-1 files properly on MS-Windows. +- write.fwf() now properly handles matrix arguments. + Changes in 2.17.0 (2015-07-02) ------------------------------ From noreply at r-forge.r-project.org Tue Jun 6 19:18:49 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 6 Jun 2017 19:18:49 +0200 (CEST) Subject: [R-gregmisc-commits] r2157 - pkg/gdata/inst/doc Message-ID: <20170606171850.033E7188AD8@r-forge.r-project.org> Author: warnes Date: 2017-06-06 19:18:49 +0200 (Tue, 06 Jun 2017) New Revision: 2157 Added: pkg/gdata/inst/doc/mapLevels.Rnw pkg/gdata/inst/doc/unknown.Rnw Log: Add vignette files Added: pkg/gdata/inst/doc/mapLevels.Rnw =================================================================== --- pkg/gdata/inst/doc/mapLevels.Rnw (rev 0) +++ pkg/gdata/inst/doc/mapLevels.Rnw 2017-06-06 17:18:49 UTC (rev 2157) @@ -0,0 +1,230 @@ + +%\VignetteIndexEntry{Mapping levels of a factor} +%\VignettePackage{gdata} +%\VignetteKeywords{levels, factor, manip} + +\documentclass[a4paper]{report} +\usepackage{Rnews} +\usepackage[round]{natbib} +\bibliographystyle{abbrvnat} + +\usepackage{Sweave} +\SweaveOpts{strip.white=all, keep.source=TRUE} + +\begin{document} +\SweaveOpts{concordance=TRUE} + +\begin{article} + +\title{Mapping levels of a factor} +\subtitle{The \pkg{gdata} package} +\author{by Gregor Gorjanc} + +\maketitle + +\section{Introduction} + +Factors use levels attribute to store information on mapping between +internal integer codes and character values i.e. levels. First level is +mapped to internal integer code 1 and so on. Although some users do not +like factors, their use is more efficient in terms of storage than for +character vectors. Additionally, there are many functions in base \R{} that +provide additional value for factors. Sometimes users need to work with +internal integer codes and mapping them back to factor, especially when +interfacing external programs. Mapping information is also of interest if +there are many factors that should have the same set of levels. This note +describes \code{mapLevels} function, which is an utility function for +mapping the levels of a factor in \pkg{gdata} \footnote{from version 2.3.1} +package \citep{WarnesGdata}. + +\section{Description with examples} + +Function \code{mapLevels()} is an (S3) generic function and works on +\code{factor} and \code{character} atomic classes. It also works on +\code{list} and \code{data.frame} objects with previously mentioned atomic +classes. Function \code{mapLevels} produces a so called ``map'' with names +and values. Names are levels, while values can be internal integer codes or +(possibly other) levels. This will be clarified later on. Class of this +``map'' is \code{levelsMap}, if \code{x} in \code{mapLevels()} was atomic +or \code{listLevelsMap} otherwise - for \code{list} and \code{data.frame} +classes. The following example shows the creation and printout of such a +``map''. + +<>= +library(gdata) +(fac <- factor(c("B", "A", "Z", "D"))) +(map <- mapLevels(x=fac)) +@ + +If we have to work with internal integer codes, we can transform factor to +integer and still get ``back the original factor'' with ``map'' used as +argument in \code{mapLevels<-} function as shown bellow. \code{mapLevels<-} +is also an (S3) generic function and works on same classes as +\code{mapLevels} plus \code{integer} atomic class. + +<>= +(int <- as.integer(fac)) +mapLevels(x=int) <- map +int +identical(fac, int) +@ + +Internally ``map'' (\code{levelsMap} class) is a \code{list} (see bellow), +but its print method unlists it for ease of inspection. ``Map'' from +example has all components of length 1. This is not mandatory as +\code{mapLevels<-} function is only a wrapper around workhorse function +\code{levels<-} and the later can accept \code{list} with components of +various lengths. + +<>= +str(map) +@ + +Although not of primary importance, this ``map'' can also be used to remap +factor levels as shown bellow. Components ``later'' in the map take over +the ``previous'' ones. Since this is not optimal I would rather recommend +other approaches for ``remapping'' the levels of a \code{factor}, say +\code{recode} in \pkg{car} package \citep{FoxCar}. + +<>= +map[[2]] <- as.integer(c(1, 2)) +map +int <- as.integer(fac) +mapLevels(x=int) <- map +int +@ + +Up to now examples showed ``map'' with internal integer codes for values +and levels for names. I call this integer ``map''. On the other hand +character ``map'' uses levels for values and (possibly other) levels for +names. This feature is a bit odd at first sight, but can be used to easily +unify levels and internal integer codes across several factors. Imagine +you have a factor that is for some reason split into two factors \code{f1} +and \code{f2} and that each factor does not have all levels. This is not +uncommon situation. + +<>= +(f1 <- factor(c("A", "D", "C"))) +(f2 <- factor(c("B", "D", "C"))) +@ + +If we work with this factors, we need to be careful as they do not have the +same set of levels. This can be solved with appropriately specifying +\code{levels} argument in creation of factors i.e. \code{levels=c("A", "B", + "C", "D")} or with proper use of \code{levels<-} function. I say proper +as it is very tempting to use: + +<>= +fTest <- f1 +levels(fTest) <- c("A", "B", "C", "D") +fTest +@ + +Above example extends set of levels, but also changes level of 2nd and 3rd +element in \code{fTest}! Proper use of \code{levels<-} (as shown in +\code{levels} help page) would be: + +<>= +fTest <- f1 +levels(fTest) <- list(A="A", B="B", + C="C", D="D") +fTest +@ + +Function \code{mapLevels} with character ``map'' can help us in such +scenarios to unify levels and internal integer codes across several +factors. Again the workhorse under this process is \code{levels<-} function +from base \R{}! Function \code{mapLevels<-} just controls the assignment of +(integer or character) ``map'' to \code{x}. Levels in \code{x} that match +``map'' values (internal integer codes or levels) are changed to ``map'' +names (possibly other levels) as shown in \code{levels} help page. Levels +that do not match are converted to \code{NA}. Integer ``map'' can be +applied to \code{integer} or \code{factor}, while character ``map'' can be +applied to \code{character} or \code{factor}. Result of \code{mapLevels<-} +is always a \code{factor} with possibly ``remapped'' levels. + +To get one joint character ``map'' for several factors, we need to put +factors in a \code{list} or \code{data.frame} and use arguments +\code{codes=FALSE} and \code{combine=TRUE}. Such map can then be used to +unify levels and internal integer codes. + +<>= +(bigMap <- mapLevels(x=list(f1, f2), + codes=FALSE, + combine=TRUE)) +mapLevels(f1) <- bigMap +mapLevels(f2) <- bigMap +f1 +f2 +cbind(as.character(f1), as.integer(f1), + as.character(f2), as.integer(f2)) +@ + +If we do not specify \code{combine=TRUE} (which is the default behaviour) +and \code{x} is a \code{list} or \code{data.frame}, \code{mapLevels} +returns ``map'' of class \code{listLevelsMap}. This is internally a +\code{list} of ``maps'' (\code{levelsMap} objects). Both +\code{listLevelsMap} and \code{levelsMap} objects can be passed to +\code{mapLevels<-} for \code{list}/\code{data.frame}. Recycling occurs when +length of \code{listLevelsMap} is not the same as number of +components/columns of a \code{list}/\code{data.frame}. + +Additional convenience methods are also implemented to ease the work with +``maps'': + +\begin{itemize} + +\item \code{is.levelsMap}, \code{is.listLevelsMap}, \code{as.levelsMap} and + \code{as.listLevelsMap} for testing and coercion of user defined + ``maps'', + +\item \code{"["} for subsetting, + +\item \code{c} for combining \code{levelsMap} or \code{listLevelsMap} + objects; argument \code{recursive=TRUE} can be used to coerce + \code{listLevelsMap} to \code{levelsMap}, for example \code{c(llm1, llm2, + recursive=TRUE)} and + +\item \code{unique} and \code{sort} for \code{levelsMap}. + +\end{itemize} + +\section{Summary} + +Functions \code{mapLevels} and \code{mapLevels<-} can help users to map +internal integer codes to factor levels and unify levels as well as +internal integer codes among several factors. I welcome any comments or +suggestions. + +% \bibliography{refs} +\begin{thebibliography}{1} +\providecommand{\natexlab}[1]{#1} +\providecommand{\url}[1]{\texttt{#1}} +\expandafter\ifx\csname urlstyle\endcsname\relax + \providecommand{\doi}[1]{doi: #1}\else + \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi + +\bibitem[Fox(2006)]{FoxCar} +J.~Fox. +\newblock \emph{car: Companion to Applied Regression}, 2006. +\newblock URL \url{http://socserv.socsci.mcmaster.ca/jfox/}. +\newblock R package version 1.1-1. + +\bibitem[Warnes(2006)]{WarnesGdata} +G.~R. Warnes. +\newblock \emph{gdata: Various R programming tools for data manipulation}, + 2006. +\newblock URL + \url{http://cran.r-project.org/src/contrib/Descriptions/gdata.html}. +\newblock R package version 2.3.1. Includes R source code and/or documentation + contributed by Ben Bolker, Gregor Gorjanc and Thomas Lumley. + +\end{thebibliography} + +\address{Gregor Gorjanc\\ + University of Ljubljana, Slovenia\\ +\email{gregor.gorjanc at bfro.uni-lj.si}} + +\end{article} + +\end{document} Added: pkg/gdata/inst/doc/unknown.Rnw =================================================================== --- pkg/gdata/inst/doc/unknown.Rnw (rev 0) +++ pkg/gdata/inst/doc/unknown.Rnw 2017-06-06 17:18:49 UTC (rev 2157) @@ -0,0 +1,272 @@ + +%\VignetteIndexEntry{Working with Unknown Values} +%\VignettePackage{gdata} +%\VignetteKeywords{unknown, missing, manip} + +\documentclass[a4paper]{report} +\usepackage{Rnews} +\usepackage[round]{natbib} +\bibliographystyle{abbrvnat} + +\usepackage{Sweave} +\SweaveOpts{strip.white=all, keep.source=TRUE} + +\begin{document} + +\begin{article} + +\title{Working with Unknown Values} +\subtitle{The \pkg{gdata} package} +\author{by Gregor Gorjanc} + +\maketitle + +This vignette has been published as \cite{Gorjanc}. + +\section{Introduction} + +Unknown or missing values can be represented in various ways. For example +SAS uses \code{.}~(dot), while \R{} uses \code{NA}, which we can read as +Not Available. When we import data into \R{}, say via \code{read.table} or +its derivatives, conversion of blank fields to \code{NA} (according to +\code{read.table} help) is done for \code{logical}, \code{integer}, +\code{numeric} and \code{complex} classes. Additionally, the +\code{na.strings} argument can be used to specify values that should also +be converted to \code{NA}. Inversely, there is an argument \code{na} in +\code{write.table} and its derivatives to define value that will replace +\code{NA} in exported data. There are also other ways to import/export data +into \R{} as described in the {\emph R Data Import/Export} manual +\citep{RImportExportManual}. However, all approaches lack the possibility +to define unknown value(s) for some particular column. It is possible that +an unknown value in one column is a valid value in another column. For +example, I have seen many datasets where values such as 0, -9, 999 and +specific dates are used as column specific unknown values. + +This note describes a set of functions in package \pkg{gdata}\footnote{ + package version 2.3.1} \citep{WarnesGdata}: \code{isUnknown}, +\code{unknownToNA} and \code{NAToUnknown}, which can help with testing for +unknown values and conversions between unknown values and \code{NA}. All +three functions are generic (S3) and were tested (at the time of writing) +to work with: \code{integer}, \code{numeric}, \code{character}, +\code{factor}, \code{Date}, \code{POSIXct}, \code{POSIXlt}, \code{list}, +\code{data.frame} and \code{matrix} classes. + +\section{Description with examples} + +The following examples show simple usage of these functions on +\code{numeric} and \code{factor} classes, where value \code{0} (beside +\code{NA}) should be treated as an unknown value: + +<>= +library("gdata") +xNum <- c(0, 6, 0, 7, 8, 9, NA) +isUnknown(x=xNum) +@ + +The default unknown value in \code{isUnknown} is \code{NA}, which means +that output is the same as \code{is.na} --- at least for atomic +classes. However, we can pass the argument \code{unknown} to define which +values should be treated as unknown: + +<>= +isUnknown(x=xNum, unknown=0) +@ + +This skipped \code{NA}, but we can get the expected answer after +appropriately adding \code{NA} into the argument \code{unknown}: + +<>= +isUnknown(x=xNum, unknown=c(0, NA)) +@ + +Now, we can change all unknown values to \code{NA} with \code{unknownToNA}. +There is clearly no need to add \code{NA} here. This step is very handy +after importing data from an external source, where many different unknown +values might be used. Argument \code{warning=TRUE} can be used, if there is +a need to be warned about ``original'' \code{NA}s: + +<>= +(xNum2 <- unknownToNA(x=xNum, unknown=0)) +@ + +Prior to export from \R{}, we might want to change unknown values +(\code{NA} in \R{}) to some other value. Function \code{NAToUnknown} can be +used for this: + +<>= +NAToUnknown(x=xNum2, unknown=999) +@ + +Converting \code{NA} to a value that already exists in \code{x} issues an +error, but \code{force=TRUE} can be used to overcome this if needed. But be +warned that there is no way back from this step: + +<>= +NAToUnknown(x=xNum2, unknown=7, force=TRUE) +@ + +Examples below show all peculiarities with class \code{factor}. +\code{unknownToNA} removes \code{unknown} value from levels and inversely +\code{NAToUnknown} adds it with a warning. Additionally, \code{"NA"} is +properly distinguished from \code{NA}. It can also be seen that the +argument \code{unknown} in functions \code{isUnknown} and +\code{unknownToNA} need not match the class of \code{x} (otherwise factor +should be used) as the test is internally done with \code{\%in\%}, which +nicely resolves coercing issues. + +<>= +(xFac <- factor(c(0, "BA", "RA", "BA", NA, "NA"))) +isUnknown(x=xFac) +isUnknown(x=xFac, unknown=0) +isUnknown(x=xFac, unknown=c(0, NA)) +isUnknown(x=xFac, unknown=c(0, "NA")) +isUnknown(x=xFac, unknown=c(0, "NA", NA)) + +(xFac <- unknownToNA(x=xFac, unknown=0)) +(xFac <- NAToUnknown(x=xFac, unknown=0)) +@ + +These two examples with classes \code{numeric} and \code{factor} are fairly +simple and we could get the same results with one or two lines of \R{} +code. The real benefit of the set of functions presented here is in +\code{list} and \code{data.frame} methods, where \code{data.frame} methods +are merely wrappers for \code{list} methods. + +We need additional flexibility for \code{list}/\code{data.frame} methods, +due to possibly having multiple unknown values that can be different among +\code{list} components or \code{data.frame} columns. For these two methods, +the argument \code{unknown} can be either a \code{vector} or \code{list}, +both possibly named. Of course, greater flexibility (defining multiple +unknown values per component/column) can be achieved with a \code{list}. + +When a \code{vector}/\code{list} object passed to the argument +\code{unknown} is not named, the first value/component of a +\code{vector}/\code{list} matches the first component/column of a +\code{list}/\code{data.frame}. This can be quite error prone, especially +with \code{vectors}. Therefore, I encourage the use of a \code{list}. In +case \code{vector}/\code{list} passed to argument \code{unknown} is named, +names are matched to names of \code{list} or \code{data.frame}. If lengths +of \code{unknown} and \code{list} or \code{data.frame} do not match, +recycling occurs. + +The example below illustrates the application of the described functions to +a list which is composed of previously defined and modified numeric +(\code{xNum}) and factor (\code{xFac}) classes. First, function +\code{isUnknown} is used with \code{0} as an unknown value. Note that we +get \code{FALSE} for \code{NA}s as has been the case in the first example. + +<>= +(xList <- list(a=xNum, b=xFac)) +isUnknown(x=xList, unknown=0) +@ + +We need to add \code{NA} as an unknown value. However, we do not get the +expected result this way! + +<>= +isUnknown(x=xList, unknown=c(0, NA)) +@ + +This is due to matching of values in the argument \code{unknown} and +components in a \code{list}; i.e., \code{0} is used for component \code{a} +and \code{NA} for component \code{b}. Therefore, it is less error prone +and more flexible to pass a \code{list} (preferably a named list) to the +argument \code{unknown}, as shown below. + +<>= +(xList1 <- unknownToNA(x=xList, + unknown=list(b=c(0, "NA"), + a=0))) +@ + +Changing \code{NA}s to some other value (only one per component/column) can +be accomplished as follows: + +<>= +NAToUnknown(x=xList1, + unknown=list(b="no", a=0)) +@ + +A named component \code{.default} of a \code{list} passed to argument +\code{unknown} has a special meaning as it will match a component/column +with that name and any other not defined in \code{unknown}. As such it is +very useful if the number of components/columns with the same unknown +value(s) is large. Consider a wide \code{data.frame} named \code{df}. Now +\code{.default} can be used to define unknown value for several columns: + +<>= +df <- data.frame(col1=c(0, 1, 999, 2), + col2=c("a", "b", "c", "unknown"), + col3=c(0, 1, 2, 3), + col4=c(0, 1, 2, 2)) +@ + +<>= +tmp <- list(.default=0, + col1=999, + col2="unknown") +(df2 <- unknownToNA(x=df, + unknown=tmp)) +@ + +If there is a need to work only on some components/columns you can of +course ``skip'' columns with standard \R{} mechanisms, i.e., +by subsetting \code{list} or \code{data.frame} objects: + +<>= +df2 <- df +cols <- c("col1", "col2") +tmp <- list(col1=999, + col2="unknown") +df2[, cols] <- unknownToNA(x=df[, cols], + unknown=tmp) +df2 +@ + +\section{Summary} + +Functions \code{isUnknown}, \code{unknownToNA} and \code{NAToUnknown} +provide a useful interface to work with various representations of +unknown/missing values. Their use is meant primarily for shaping the data +after importing to or before exporting from \R{}. I welcome any comments or +suggestions. + +% \bibliography{refs} + +\begin{thebibliography}{1} +\providecommand{\natexlab}[1]{#1} +\providecommand{\url}[1]{\texttt{#1}} +\expandafter\ifx\csname urlstyle\endcsname\relax + \providecommand{\doi}[1]{doi: #1}\else + \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi + +\bibitem[Gorjanc(2007)]{Gorjanc} +G.~Gorjanc. +\newblock Working with unknown values: the gdata package. +\newblock \emph{R News}, 7\penalty0 (1):\penalty0 24--26, 2007. +\newblock URL \url{http://CRAN.R-project.org/doc/Rnews/Rnews_2007-1.pdf}. + +\bibitem[{R Development Core Team}(2006)]{RImportExportManual} +{R Development Core Team}. +\newblock \emph{R Data Import/Export}, 2006. +\newblock URL \url{http://cran.r-project.org/manuals.html}. +\newblock ISBN 3-900051-10-0. + +\bibitem[Warnes (2006)]{WarnesGdata} +G.~R. Warnes. +\newblock \emph{gdata: Various R programming tools for data manipulation}, + 2006. +\newblock URL + \url{http://cran.r-project.org/src/contrib/Descriptions/gdata.html}. +\newblock R package version 2.3.1. Includes R source code and/or documentation + contributed by Ben Bolker, Gregor Gorjanc and Thomas Lumley. + +\end{thebibliography} + +\address{Gregor Gorjanc\\ + University of Ljubljana, Slovenia\\ +\email{gregor.gorjanc at bfro.uni-lj.si}} + +\end{article} + +\end{document} From noreply at r-forge.r-project.org Tue Jun 13 00:49:50 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 00:49:50 +0200 (CEST) Subject: [R-gregmisc-commits] r2158 - in pkg/gtools: R man Message-ID: <20170612224950.99A0F188EE1@r-forge.r-project.org> Author: warnes Date: 2017-06-13 00:49:49 +0200 (Tue, 13 Jun 2017) New Revision: 2158 Modified: pkg/gtools/R/capwords.R pkg/gtools/man/capwords.Rd Log: Add capwords() function to apply standard capitalization rules to a scharacter string. Modified: pkg/gtools/R/capwords.R =================================================================== --- pkg/gtools/R/capwords.R 2017-06-06 17:18:49 UTC (rev 2157) +++ pkg/gtools/R/capwords.R 2017-06-12 22:49:49 UTC (rev 2158) @@ -1,60 +1,59 @@ -capwords <- function(s, - strict=FALSE, - AP=TRUE, - onlyfirst=FALSE, - preserveMixed=FALSE, - sep=" ") +capwords <- function(s, + strict=FALSE, + AP=TRUE, + onlyfirst=FALSE, + preserveMixed=FALSE, + sep=" ") { # worker functions - cap <- function(s) + cap <- function(s) paste(toupper(substring(s, 1, 1)), { - s <- substring(s, 2); + s <- substring(s, 2); if(strict) tolower(s) else s }, sep = "" ) - + # test if there is a lowercase letter followed by an uppercase letter - isMixedCase <- function(s) + isMixedCase <- function(s) grepl("[a-z][A-Z]", s) words <- unlist(strsplit(s, split = sep)) mixedCaseFlag <- sapply(words, isMixedCase) - + # First, capitalize *every* word if(!onlyfirst) { - newWords <- sapply(words, - cap, - USE.NAMES = !is.null(names(retval)) - ) - + newWords <- sapply(words, + cap + ) + if(preserveMixed==TRUE) newWords[mixedCaseFlag] <- words[mixedCaseFlag] - + words <- newWords } - + # Next (optionally) uncapitalize prepositions and conjunctions # recommended by the Associated Press. - AP.nocap <- c("a", "an", "and", "at", "but", "by", "for", "in", - "nor", "of", "on", "or", "so", "the", "to", "up", + AP.nocap <- c("a", "an", "and", "at", "but", "by", "for", "in", + "nor", "of", "on", "or", "so", "the", "to", "up", "yet") - - if(AP && !onlyfirst) + + if(AP && !onlyfirst) for(word in AP.nocap) - words <- gsub(paste0("^",word,"$"), - word, - words, + words <- gsub(paste0("^",word,"$"), + word, + words, ignore.case=TRUE) - - + + # Finally, ensure that the first word is capitalized if(length(words)>0 && mixedCaseFlag[1]==FALSE) words[1] <- cap(words[1]) - + retval <- paste(words, collapse=sep) - + retval -} \ No newline at end of file +} Modified: pkg/gtools/man/capwords.Rd =================================================================== --- pkg/gtools/man/capwords.Rd 2017-06-06 17:18:49 UTC (rev 2157) +++ pkg/gtools/man/capwords.Rd 2017-06-12 22:49:49 UTC (rev 2158) @@ -7,18 +7,20 @@ This function capitalizes words for use in titles } \usage{ -capwords(s, strict=FALSE, AP=TRUE, firstonly=FALSE, +capwords(s, strict=FALSE, AP=TRUE, onlyfirst=FALSE, preserveMixed=FALSE, sep=" ") } \arguments{ \item{s}{character string to be processed} - \item{strict}{Logical, remove all additional capitalization} + \item{strict}{Logical, remove all additional capitalization.} \item{AP}{Logical, apply the Associated Press (AP) rules for prepositions and conjunctions that should not be capitalized in titles.} + \item{onlyfirst}{Logical, only capitalize the first word.} \item{preserveMixed}{Logical, preserve the capitalization - mixed-case words containing an upper-case letter after a + mixed-case words containing an upper-case letter after a lower-case letter.} + \item{sep}{Character string, word separator} } \details{ This function separates the provided character string into separate words using \code{sep} as the word separator. If \code{firstonly==TRUE}, it then capitalizes the first letter the first word, otherwise (the default), it capitalizes the first letter of every word. If \code{AP==TRUE}, it then un-capitalizes words in the Associated Press's (AP) list of prepositions and conjunctions should not be capitalized in titles. Next, it capitalizes the first word. It then re-joins the words using the specified separator. @@ -29,10 +31,10 @@ A character scalar containing the capitalized words. } \references{ -Fogarty, Mignon. ?Capitalizing Titles: Which words should you capitalize?? Grammar Girl's Quick and Dirty Tips for Better Writing. 9 Jun. 2011. Quick and Dirty Tips Website. Accessed 22 April 2016 \url{http://www.quickanddirtytips.com/education/grammar/capitalizing-titles} +Fogarty, Mignon. Capitalizing Titles: "Which words should you capitalize? Grammar Girl's Quick and Dirty Tips for Better Writing. 9 Jun. 2011. Quick and Dirty Tips Website." Accessed 22 April 2016 \url{http://www.quickanddirtytips.com/education/grammar/capitalizing-titles} } \author{ -Gregory R. Warnes \email{greg at warnes.net} based on code from the \code{\link[base]{chartr}} manual page, +Gregory R. Warnes \email{greg at warnes.net} based on code from the \code{\link[base]{chartr}} manual page, and \code{\link[taxize]{capwords}} in the taxize package. } From noreply at r-forge.r-project.org Tue Jun 13 00:51:21 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 00:51:21 +0200 (CEST) Subject: [R-gregmisc-commits] r2159 - pkg/gtools/man Message-ID: <20170612225121.E86CF1884CC@r-forge.r-project.org> Author: warnes Date: 2017-06-13 00:51:21 +0200 (Tue, 13 Jun 2017) New Revision: 2159 Modified: pkg/gtools/man/ask.Rd Log: Add 'con' argument to ask() to allow specification of the connection to query for input. Modified: pkg/gtools/man/ask.Rd =================================================================== --- pkg/gtools/man/ask.Rd 2017-06-12 22:49:49 UTC (rev 2158) +++ pkg/gtools/man/ask.Rd 2017-06-12 22:51:21 UTC (rev 2159) @@ -5,15 +5,21 @@ Display a prompt and collect the user's response } \usage{ -ask(msg = "Press to continue: ") +ask(msg = "Press to continue: ", con=stdin()) } \arguments{ \item{msg}{Character vetor providing the message to be displayed} + \item{con}{Character connection to query, defaults to \code{stdin()}.} } \details{ The prompt message will be displayed, and then \code{readLines} is used to collect a single input value (possibly empty), which is then returned. + + In most situations using the default \code{con=stdin()} should work + properly. Under RStudio, it is necessary to specify + \code{con=file("stdin")} for proper operaation. + } \value{ A character scalar containing the input providede by the user. @@ -31,6 +37,6 @@ age <- as.numeric(age) cat("In 10 years you will be", age+10, "years old!\n") } - + } \keyword{IO} From noreply at r-forge.r-project.org Tue Jun 13 00:52:41 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 00:52:41 +0200 (CEST) Subject: [R-gregmisc-commits] r2160 - in pkg/gtools: man tests Message-ID: <20170612225241.8D77A1884CC@r-forge.r-project.org> Author: warnes Date: 2017-06-13 00:52:41 +0200 (Tue, 13 Jun 2017) New Revision: 2160 Modified: pkg/gtools/man/setTCPNoDelay.Rd pkg/gtools/tests/test_setTCPNoDelay.R Log: Add improved example to man page for setTCPnoDelat() and fix test function. Modified: pkg/gtools/man/setTCPNoDelay.Rd =================================================================== --- pkg/gtools/man/setTCPNoDelay.Rd 2017-06-12 22:51:21 UTC (rev 2159) +++ pkg/gtools/man/setTCPNoDelay.Rd 2017-06-12 22:52:41 UTC (rev 2160) @@ -46,8 +46,17 @@ } \examples{ \dontrun{ - s <- make.socket(host='www.r-project.org', port=80) - setTCPNoDelay(s, value=TRUE) +host <- "www.r-project.org" +socket <- make.socket(host, 80) +print(socket) +setTCPNoDelay(socket, TRUE) + +write.socket(socket, "GET /\n\n") +write.socket(socket, "A") +write.socket(socket, "B\n") +while( (str <- read.socket(socket)) > "") + cat(str) +close.socket(socket) } } Modified: pkg/gtools/tests/test_setTCPNoDelay.R =================================================================== --- pkg/gtools/tests/test_setTCPNoDelay.R 2017-06-12 22:51:21 UTC (rev 2159) +++ pkg/gtools/tests/test_setTCPNoDelay.R 2017-06-12 22:52:41 UTC (rev 2160) @@ -30,14 +30,14 @@ -host <- "rdgas05026.am.boehringer.com" -#host <- "www.r-project.org" +host <- "www.r-project.org" socket <- make.socket(host, 80) print(socket) setTCPNoDelay(socket, TRUE) write.socket(socket, "GET /\n\n") -write.socket(socket, "A\0B\n") +write.socket(socket, "A") +write.socket(socket, "B\n") while( (str <- read.socket(socket)) > "") cat(str) close.socket(socket) From noreply at r-forge.r-project.org Tue Jun 13 00:53:23 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 00:53:23 +0200 (CEST) Subject: [R-gregmisc-commits] r2161 - pkg/gtools/tests Message-ID: <20170612225324.06D901884CC@r-forge.r-project.org> Author: warnes Date: 2017-06-13 00:53:23 +0200 (Tue, 13 Jun 2017) New Revision: 2161 Modified: pkg/gtools/tests/smartbind_emptynames.R Log: Fix test for smartbind with empty column names Modified: pkg/gtools/tests/smartbind_emptynames.R =================================================================== --- pkg/gtools/tests/smartbind_emptynames.R 2017-06-12 22:52:41 UTC (rev 2160) +++ pkg/gtools/tests/smartbind_emptynames.R 2017-06-12 22:53:23 UTC (rev 2161) @@ -1,5 +1,4 @@ -library(devtools) -load_all("~/src/r-gregmisc/gtools") # for updated smartbind +library(gtools) df1 <- data.frame(a=1, b=2, d=TRUE ) df2 <- data.frame( b=7, c="YES", d=FALSE) From noreply at r-forge.r-project.org Tue Jun 13 01:21:21 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:21:21 +0200 (CEST) Subject: [R-gregmisc-commits] r2162 - in pkg/gtools: . inst Message-ID: <20170612232121.576E618842B@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:21:20 +0200 (Tue, 13 Jun 2017) New Revision: 2162 Modified: pkg/gtools/DESCRIPTION pkg/gtools/NAMESPACE pkg/gtools/inst/ChangeLog pkg/gtools/inst/NEWS Log: Update meta files for gtools 3.7.0 Modified: pkg/gtools/DESCRIPTION =================================================================== --- pkg/gtools/DESCRIPTION 2017-06-12 22:53:23 UTC (rev 2161) +++ pkg/gtools/DESCRIPTION 2017-06-12 23:21:20 UTC (rev 2162) @@ -22,9 +22,10 @@ - efficient 'rbind' of data frames, even if the column names don't match ('smartbind'), - generate significance stars from p-values ('stars.pval'), - convert characters to/from ASCII codes. -Version: 3.6.2 -Date: 2016-08-15 +Version: 3.7.0 +Date: 2017-06-11 Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley Maintainer: Gregory R. Warnes License: GPL-2 +Depends: methods, stats, utils Modified: pkg/gtools/NAMESPACE =================================================================== --- pkg/gtools/NAMESPACE 2017-06-12 22:53:23 UTC (rev 2161) +++ pkg/gtools/NAMESPACE 2017-06-12 23:21:20 UTC (rev 2162) @@ -45,3 +45,9 @@ unByteCode, unByteCodeAssign ) + +importFrom("methods", "new") +importFrom("stats", "na.omit", "quantile", "rgamma", "symnum") +importFrom("utils", "available.packages", "flush.console", "head", + "help.search", "installed.packages", "modifyList", + "packageVersion") Modified: pkg/gtools/inst/ChangeLog =================================================================== --- pkg/gtools/inst/ChangeLog 2017-06-12 22:53:23 UTC (rev 2161) +++ pkg/gtools/inst/ChangeLog 2017-06-12 23:21:20 UTC (rev 2162) @@ -1,17 +1,50 @@ +2017-06-12 warnes + + * [r2161] tests/smartbind_emptynames.R: Fix test for smartbind with + empty column names + + * [r2160] man/setTCPNoDelay.Rd, tests/test_setTCPNoDelay.R: Add + improved example to man page for setTCPNoDelay() and fix test + function. + + * [r2159] man/ask.Rd: Add 'con' argument to ask() to allow + specification of the connection to query for input. + + * [r2158] R/capwords.R, man/capwords.Rd: Add capwords() function to + apply standard capitalization rules to a scharacter string. + +2017-05-23 warnes + + * [r2145] R/ask.R, R/quantcut.R, R/smartbind.R: - Integrate changes + made by Mango Solutions at + https://github.com/MangoTheCat/SASxport. - Remove functions + duplicated from the Hmisc package. - Minor code cleanup. + +2016-08-24 warnes + + * [r2144] tests/test_setTCPNoDelay.R: Add more testing code. + 2016-08-15 warnes + * [r2143] inst/ChangeLog: Update ChangeLog + * [r2142] DESCRIPTION: Update version number and date - * [r2141] tests/test_setTCPNoDelay.R: Add test code for + + * [r2141] tests/test_setTCPNoDelay.R[ADD]: Add test code for setTCPNoDelay + * [r2140] R/setTCPNoDelay.R: Modify setTCPNoDelay to work with current socket objects + * [r2139] src/setTCPNoDelay.c: checkStatus() was not correctly getting the error message. 2016-04-22 warnes - * [r2127] NAMESPACE, R/capwords.R, man/capwords.Rd: Add capwords() - function to properly capatilize strings for use in titles + * [r2127] NAMESPACE, R/capwords.R[ADD], man/capwords.Rd[ADD]: Add + capwords() function to properly capatilize strings for use in + titles + * [r2126] R/na.replace.R, man/na.replace.Rd: na.replace() now accepts a function providing the replcement value. @@ -28,19 +61,20 @@ 2015-08-08 warnes - * [r2067] tests/smartbind_emptynames.R: Add half-hearted test file + * [r2067] tests/smartbind_emptynames.R[ADD]: Add half-hearted test + file + * [r2066] R/smartbind.R: - Improve assignment of default names in - smartbind. - - Disambiguate 'list' into an object named 'list' and the - function - base::list() in smartbind(). + smartbind. - Disambiguate 'list' into an object named 'list' and + the function base::list() in smartbind(). + * [r2065] DESCRIPTION, man/smartbind.Rd: Add example of using 'list' argument to smartbind() man page. + * [r2064] R/smartbind.R, man/smartbind.Rd: - smartbind() gets a new - argument 'list' to pass a list of data - frames, instead of/in addition to data frames as arguments. - - Fix bug in smartbind's handling of factor levels. - + argument 'list' to pass a list of data frames, instead of/in + addition to data frames as arguments. - Fix bug in smartbind's + handling of factor levels. 2015-07-14 warnes @@ -50,106 +84,131 @@ 2015-05-27 warnes - * [r2049] data/badDend.rda, man/badDend.Rd, man/unByteCode.Rd: - Create local dataset to use in the example code for unByteCode - instead of relying on web access. + * [r2049] data/badDend.rda[ADD], man/badDend.Rd[ADD], + man/unByteCode.Rd: Create local dataset to use in the example + code for unByteCode instead of relying on web access. + * [r2048] R/trimws.R: Fix missing closing paren. - * [r2047] R/keywords.R, R/roman2int.R, R/trim.R, R/trimws.R: Two - functions in gtools need to use either gdata::trim() or - base::trimws() (added in R 3.2.0). The previous solution was to - include gdata/R/gdata/R/trim.R in gtools using a symbolic link. - + + * [r2047] R/keywords.R, R/roman2int.R, R/trim.R[DEL], + R/trimws.R[ADD]: Two functions in gtools need to use either + gdata::trim() or base::trimws() (added in R 3.2.0). The previous + solution was to include gdata/R/gdata/R/trim.R in gtools using a + symbolic link. + Unfortunately, Rforge doesn't seem to like the symbolic link when building packages, and generates an error. - + So, instead, create the file trimws.R, which creates trimws() if - it - isn't already available (e.g. via base::trimws), and modify - keywords() - and roman2int() to use trimws() instead of gdata::trim(). - * [r2046] man/roman2int.Rd: Add man page for roman2int(). + it isn't already available (e.g. via base::trimws), and modify + keywords() and roman2int() to use trimws() instead of + gdata::trim(). + + * [r2046] man/roman2int.Rd[ADD]: Add man page for roman2int(). + * [r2045] man/mixedsort.Rd: Remove extraneous closing paren. + * [r2044] NAMESPACE: Add roman2int() to exported function list. + * [r2043] R/asc.R: Looks like we also lost the change of argument name to chr(). Fixed. + * [r2042] R/asc.R: Somehow lost 'simplify=TRUE' argument to asc. Fixed. + * [r2041] DESCRIPTION: Update gtools version number to 3.5.0 + * [r2040] DESCRIPTION, inst/ChangeLog, inst/NEWS: Update DESCRIPTION, ChangeLog, NEWS + * [r2039] R/mixedsort.R, man/mixedsort.Rd: Add roman numeral support to mixedorder() and mixedsort(). - * [r2037] man/asc.Rd: Add asc() and chr() functions for converting - between characters and ASCII codes + + * [r2037] man/asc.Rd[ADD]: Add asc() and chr() functions for + converting between characters and ASCII codes + * [r2036] R/roman2int.R: roman2int() now returns NA for invalid roman numeral strings instead of generating an error. + * [r2035] NAMESPACE: Add asc(), chr(), assignEdgewise(), - unByteCode(), and - unByteCodeAssign() to package NAMESPACE. - * [r2034] R/asc.R: Add asc() and chr() functions for converting - between characters and ASCII codes + unByteCode(), and unByteCodeAssign() to package NAMESPACE. + * [r2034] R/asc.R[ADD]: Add asc() and chr() functions for + converting between characters and ASCII codes + 2015-05-26 warnes - * [r2030] inst/ChangeLog: Add changelog to svn repository + * [r2030] inst/ChangeLog[ADD]: Add changelog to svn repository 2015-05-25 warnes * [r2029] tests/test_ddirichlet.R: Add library call. + * [r2028] man/unByteCode.Rd: Fix typo and add documentation for argument 'name'. + * [r2027] man/mixedsort.Rd: Fix typo. + * [r2026] man/mixedsort.Rd: Add description of blanklast argument, fix typo. + * [r2025] man/quantcut.Rd: Change usage to match actual definition. + * [r2024] man/mixedsort.Rd: Note characters sorting ignores case. + * [r2023] man/mixedsort.Rd: Remove '...' from arglist to match source code. + * [r2022] man/mixedsort.Rd: Replace unicode quotes with \code{..}. 2015-05-23 warnes - * [r2021] tests/test_ddirichlet.R: Add regression test ddirichlet() - bug for x[i]=0, alpha[i]=1: - ddirichlet(x, alpha) was returning NA rather than 0. + * [r2021] tests/test_ddirichlet.R[ADD]: Add regression test + ddirichlet() bug for x[i]=0, alpha[i]=1: ddirichlet(x, alpha) was + returning NA rather than 0. + * [r2020] R/dirichlet.R: ddirichlet() was incorrectly returning NA - when x[i]=0 and - alpha[i]=1. In this case, the one calculation became (-Inf * 0), - which R evaluates to NaN. The correction is to detect this case - and - substitute -Inf instead of NaN. + when x[i]=0 and alpha[i]=1. In this case, the one calculation + became (-Inf * 0), which R evaluates to NaN. The correction is to + detect this case and substitute -Inf instead of NaN. 2015-05-08 warnes * [r2019] R/mixedsort.R: Summary: Speed up mixedorder by moving - suppressWarnings outside of - lapply loops. (Suggestion by Henrik Bengtsson.) + suppressWarnings outside of lapply loops. (Suggestion by Henrik + Bengtsson.) 2015-05-02 warnes * [r2018] Rename 'trunk' to 'pkg' for compatibility with R-forge + * [r2017] Minor layout change. + * [r2016] Remove stray 'svn' that was inserted into the code. + * [r2015] Add man page for unByteCode(), assignEdgeWise(), and unByteCodeAssign() 2015-04-28 warnes - * [r1976] Changes to mixedsort(): - - Hands off objects that are not character vectors to the default - sort. - - Add 'decreasing', 'na.last', and 'blank.last' arguments. + * [r1976] Changes to mixedsort(): - Hands off objects that are not + character vectors to the default sort. - Add 'decreasing', + 'na.last', and 'blank.last' arguments. + * [r1975] Add private function 'checkReverseDependencies'. 2015-04-23 warnes * [r1950] Update NEWS and ChangeLog + * [r1949] - The 'q' argument to quantcut()'s 'q' now accept an - integer - indicating the number of equally spaced quantile groups to - create. (Suggestion and patch submitted by Ryan C. Thompson.) + integer indicating the number of equally spaced quantile groups + to create. (Suggestion and patch submitted by Ryan C. Thompson.) + * [r1946] Revers accidental text deletion: + * [r1945] Update for gtools 3.4.3 + * [r1944] Remove debugging code and stray browser() call 2015-04-14 warnes @@ -159,10 +218,11 @@ 2015-04-09 warnes * [r1921] Update gtools ChangeLog - * [r1920] Move first()/last()/left()/right() to gdata. - Add new functions na.replace() and loadedPackages(). - Add more text to package description. + * [r1920] Move first()/last()/left()/right() to gdata. Add new + functions na.replace() and loadedPackages(). Add more text to + package description. + 2015-04-08 warnes * [r1919] Move first/last/left/right to from gtools to gdata @@ -170,33 +230,40 @@ 2015-04-06 warnes * [r1918] Correct URL + * [r1917] Update NEWS and ChangeLog for gtools 3.5.0 + * [r1916] Add ChangeLog files to repository + * [r1915] Implement fix to keywords() needed for R-3.4.1, as - suggested by Kurt - Hornik. + suggested by Kurt Hornik. + * [r1914] - Export S3 methods for first(), last(), left() and - right(). - - Ensure code matches man page for first(), last(), left(), and - right(). + right(). - Ensure code matches man page for first(), last(), + left(), and right(). 2014-10-09 warnes * [r1897] Update for 3.5.0 release of gtools + * [r1896] Make right() and left() S3 methods for classes data.frame and matrix 2014-08-27 warnes * [r1872] Fix man page + * [r1871] Finish adding first(), last(), left(), and right(). + * [r1870] Add functions first(), last(), left(), and right(). 2014-05-28 warnes * [r1816] Update for gtools 3.4.1 + * [r1815] Add test to ensure smartbind() properly handles Date columns. + * [r1814] smartbind: Convert non-native type columns (except factor) to character. @@ -209,29 +276,39 @@ * [r1810] Update ASCIIfy man page to match source code and add keywords + * [r1809] Update NEWS for gtools 3.4.0 + * [r1808] Add ASCIIfy function posted to RDevel by Arni Magnusson 2014-03-01 warnes * [r1776] Fix cut-and-paste error. + * [r1775] Update files for gtools 3.3.1 release + * [r1774] Fix bug in gtools::mixedorder regular expression for regognizing numbers. (Periods weren't escaped). 2014-02-11 warnes * [r1773] Create and use locate copy of tools:::.split_op_version. + * [r1772] Update for gtools 3.3.0. + * [r1771] Fix arguments + * [r1770] Update arguments to match code. + * [r1769] Add getDependencies() function to return a list of package dependencies. 2014-01-14 warnes * [r1768] Update for bug-fix release + * [r1767] Add test file for binsearch() function. + * [r1766] Fixed bug where binsearch() returned the wrong endpoint & value when the found value was at the upper endpoint. @@ -242,38 +319,37 @@ 2014-01-11 warnes * [r1764] Update for gtools release 3.2.0 + * [r1763] fixes for R CMD check + * [r1762] Fixes for gtools release 3.2.0 2013-12-23 warnes * [r1761] Extend the keywords() function to return keywords associated with a specified topic via 'keywords(topic)'. + * [r1760] Add keyword. + * [r1759] Add stars.pval() function to convert p-values into significance symbols. 2013-11-26 warnes * [r1748] mixedorder() was failing to correctly handle numbers - including - decimals due to a faulty regular expression. Prior to the fix: - - > drr - [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" - > gtools::mixedsort(drr) - [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" - - After the fix: - - > drr - [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" - > mixedsort(drr) - [1] "Dose 0.04 mg" "Dose 0.3 mg" "Dose 0.5 mg" - + including decimals due to a faulty regular expression. Prior to + the fix: + + > drr [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" > + gtools::mixedsort(drr) [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 + mg" After the fix: + + > drr [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" > + mixedsort(drr) [1] "Dose 0.04 mg" "Dose 0.3 mg" "Dose 0.5 mg" + In addition, an optimization was added that checked if the input - vector - was numeric. If so, simply use the existing base::order function. + vector was numeric. If so, simply use the existing base::order + function. 2013-11-18 warnes @@ -282,17 +358,23 @@ 2013-11-06 warnes * [r1746] Update files for gtools 3.1.1 + * [r1745] Fix problem with mixedorder/mixedsort when there is only zero or one elements in the vector. 2013-09-23 warnes * [r1716] Comment out empty sections in gtools-deprecated.Rd + * [r1715] Update files for gtools 3.1.0 release + * [r1714] Make 'addLast()' defunct. + * [r1713] Mark 'addLast()' as defunct and move 'lastAdd()' function to a separate file. + * [r1712] Update for gtools 3.0.1 release + * [r1711] Use 'suppressWarnings() instead of 'options(warn=-1)' in 'mixedorder()'. @@ -303,10 +385,15 @@ 2013-07-06 warnes * [r1704] Fix Rd warning. + * [r1703] Include lastAdd in NAMESPACE + * [r1702] Change assert from deprecated to defunct. + * [r1701] Improve deprecation message + * [r1700] Update for gtools 3.0.0 + * [r1699] Create new function lastAdd to replace addLast and mark addLast as deprecated. @@ -314,11 +401,16 @@ * [r1698] Point out that addLast() modifies the value of .Last in the global environment. + * [r1697] Point out that addLast() modifies the value of .Last in the global environment. + * [r1696] Update for gtools 2.7.2 mark 2 + * [r1695] Remove cross-reference to (obsolete?) moc package + * [r1694] Update for gtools 2.7.2 + * [r1693] Update for R version 3.0.0 and later 2013-03-17 warnes @@ -330,7 +422,9 @@ 2012-06-19 warnes * [r1570] Update for gtools 2.7.0. + * [r1569] Document new 'verbose' argument to smartbind(). + * [r1568] Clean up R CMD check warnings. 2012-05-04 warnes @@ -341,6 +435,7 @@ 2011-10-05 warnes * [r1518] Update version number for release + * [r1517] Add 'sep' argument to smartbind() to allow specification of character used to separate components of constructed names @@ -348,12 +443,12 @@ * [r1513] smartbind(): Prevent coersion to data frame from mangling column names. + * [r1512] Add 'fill' argument to smartbind() to specify a value to - use for - missing entries. + use for missing entries. + * [r1511] Add 'fill' argument to smartbind() to specify a value to - use for - missing entries. + use for missing entries. 2010-08-14 warnes @@ -364,7 +459,9 @@ 2010-05-01 warnes * [r1434] Update version number for new release + * [r1433] Change Greg's email address to greg at warnes.net + * [r1432] Fix error in checkRVersion() 2010-04-28 ggrothendieck2 @@ -374,9 +471,12 @@ 2009-05-09 warnes * [r1328] Escape $ in .Rd file to avoid latex issues + * [r1327] Update NEWS and create softlinks for NEWS and ChangeLog in top level directory + * [r1326] Move actual NEWS file into inst. + * [r1325] Update Greg's email address and fix Rd syntax errors 2009-02-16 warnes @@ -395,31 +495,40 @@ 2008-05-26 warnes * [r1284] Update license specification + * [r1283] Remove 'assert' man page 2008-05-22 warnes * [r1282] Finish rename of assert.R to assert-depricated.Rd + * [r1281] Add checkRVersion.R file + * [r1280] Rename again to get correct extension! + * [r1279] Update NEWS for 2.5.0 + * [r1278] Add man page for checkRVersion + * [r1277] Rename assert-deprecated.R to assert.R to meet R file name requirements. + * [r1276] Add checkRVersion to NAMESPACE, and increment version in DESCRIPTION. + * [r1275] Remove broken SEE LSO reference 2008-04-12 warnes * [r1259] Improve text explanation of how defmacro() and strmacro() - differ from - function(). + differ from function(). + * [r1258] assert() is now deprecated in favor of base::stopifnot() + * [r1257] Rename 'assert.R' to 'deprecated.R'. + * [r1256] Assert is now deprecated in favor of base::stopifnot(), - so add call to - .Deprecated() to inform the user. + so add call to .Deprecated() to inform the user. 2007-11-30 warnes @@ -430,6 +539,7 @@ * [r1121] Fix bug identified by R-2.6's check routings in binsearch() + * [r1120] Add the binsearch(), previously in the genetics package. 2007-07-18 ggorjan @@ -457,11 +567,14 @@ 2006-11-27 warnes * [r1022] Replace T with TRUE in smartbind example + * [r1021] Temprary remove to reset binary flag + * [r1020] Temprary remove to reset binary flag + * [r1019] Add smartbind() to list of exported functions, and add - corresponding - documentation file. + corresponding documentation file. + * [r1018] Update my email address 2006-11-14 ggorjan @@ -475,6 +588,7 @@ 2006-05-05 nj7w * [r958] Fixed minor typo - in {value} - n was replaced by r + * [r957] Fixed minor typos 2006-03-01 warnes @@ -488,7 +602,9 @@ 2005-12-21 warnes * [r837] Update version number and date + * [r836] Note changes for 2.2.3 + * [r835] Should now work on Windows 2005-12-20 warnes @@ -504,6 +620,7 @@ 2005-12-13 nj7w * [r810] *** empty log message *** + * [r809] Updated NEWS and removed ChangeLog 2005-12-12 nj7w @@ -522,23 +639,28 @@ * [r769] Add UseDynLib to NAMESPACE so the shared library gets properly loaded. - * [r768] - Remove debugging comments - - Change return value on success to "Success". + * [r768] - Remove debugging comments - Change return value on + success to "Success". + 2005-11-22 warnes * [r758] NAMESPACE + * [r757] Update news for 2.2.1 release. + * [r756] Fixes for R CMD check + * [r755] Add setTCPNoDelay() function and documentation + * [r745] New function 'addLast' that adds functions to R's .Last() - so that - they will be executed when R is terminating. + so that they will be executed when R is terminating. 2005-09-22 warnes * [r678] More changes for strmacro(), also changes for 2.1.1 release + * [r677] Add strmaco() which defines functions that use strings for macro definition @@ -553,24 +675,29 @@ 2005-09-02 nj7w * [r653] Exported assert + * [r652] Updated the version number + * [r651] Added NEWS + * [r650] Added ChangeLog + * [r649] Fixed syntax errors 2005-09-02 warnes * [r648] Add assert() and documentation + * [r647] Fix problem in defmacro.Rd file: don't use \code{} in the example section. 2005-08-31 warnes * [r645] Adding the defmacro() function, extracted from - + Lumley T. "Programmer's Niche: Macros in {R}", R News, 2001, Vol - 1, - No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} + 1, No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} + * [r642] Add stand-alone DESCRIPTION file and remove old DESCRIPTION.in file. @@ -588,44 +715,49 @@ 2005-05-10 warnes * [r619] Fix handling of NA's in mixedorder. We were using a high - UTF character to try - to put NA's at the end of the sort order, but R 2.1.0 checks if - characters - are in the correct range. Instead, we explicitly force NA's to - the end. + UTF character to try to put NA's at the end of the sort order, + but R 2.1.0 checks if characters are in the correct range. + Instead, we explicitly force NA's to the end. 2005-04-07 warnes * [r606] - Add scat() function which writes its arguments to stderr - and - flushes so that output is immediately displayed, but only if + and flushes so that output is immediately displayed, but only if 'getOption("DEBUG")' is true. 2005-04-02 warnes * [r600] Move drop.levels() from gtools to gdata. + * [r599] Minor reordering of functions in file + * [r598] Move frameApply() to gdata package. + * [r597] Fix error if only one value passed to mixedorder. + * [r596] Add proper handling where more than one quantile obtains the same value 2005-04-01 warnes * [r595] Add CVS ID tag to file headers. + * [r594] Fixes from Jim Rogers for R CMD check problems in frameApply 2005-03-31 warnes * [r591] Updates to drop.levels() and frameApply() from Jim Rogers + * [r590] Add ELISA data set used by frameApply and drop.levels examples 2005-02-25 warnes * [r562] Replace 'T' with TRUE. + * [r561] Remove dependency on ELISA data set for the example. + * [r558] Add drop.levels, frameApply to namespace export. 2005-02-15 warnes @@ -635,8 +767,7 @@ 2005-01-12 warnes * [r515] Add dependency on R 1.9.0+ to prevent poeple from - installing on old - versions of R which don't support namespaces. + installing on old versions of R which don't support namespaces. 2004-09-27 warneg @@ -657,10 +788,9 @@ 2004-08-26 warnes - * [r440] - Fix bug pointed out by Jim Rogers. - - Use a more distictive internal separator: $@$ instead of just $ - - Capitalization is now irrelevent for search order (unlike - ASCII). + * [r440] - Fix bug pointed out by Jim Rogers. - Use a more + distictive internal separator: $@$ instead of just $ - + Capitalization is now irrelevent for search order (unlike ASCII). 2004-06-08 warnes @@ -670,29 +800,29 @@ 2004-05-26 warnes * [r345] Escape underscores in email addresses so Latex is happy. + * [r343] Replace 'T' with 'TRUE' to pass R CMD check. 2004-05-25 warnes * [r334] Remove extraneous comments. + * [r333] Fix an error in the code when using repeats.allow=T and - r>2. Bug - report and fix both due to Elizabeth Purdom + r>2. Bug report and fix both due to Elizabeth Purdom . 2004-05-24 warnes * [r323] Check if argument is a vector before doing is.na to avoid generating a warning. + * [r322] Add invalid() function for testing if a parameter value is - non-missing, non-NA, - non-NULL. + non-missing, non-NA, non-NULL. 2004-04-27 warnes * [r321] Replaced argument `as.list' with `simplify'. Updated - documentation, - and updated examples appropriately. + documentation, and updated examples appropriately. 2004-04-26 warnes @@ -702,31 +832,28 @@ 2004-03-26 warnes * [r303] Uncomment and fix large 'n' example. - * [r301] - Update to match changes in running() - - Add examples to illustrate new arguments. - - Modify running correlation plot example to be more clear. + + * [r301] - Update to match changes in running() - Add examples to + illustrate new arguments. - Modify running correlation plot + example to be more clear. + * [r299] More of the same. + * [r297] Fix bug discovered by Sean Davis . - The running - function took an improper shortcut. When allow.fewer=FALSE it was - still passing shorter lists of elements to the called function, - and - then overwriting the results for the shorter lists with NAs. The - code - now skips evaluation of the function on lists shorter than the - specified length when allow.fewer=FALSE. + The running function took an improper shortcut. When + allow.fewer=FALSE it was still passing shorter lists of elements + to the called function, and then overwriting the results for the + shorter lists with NAs. The code now skips evaluation of the + function on lists shorter than the specified length when + allow.fewer=FALSE. 2004-01-21 warnes - * [r277] - Mark sprint() as depreciated. - - Replace references to sprint with capture.output() - - Use match.arg for halign and valign arguments to - textplot.default. - - Fix textplot.character so that a vector of characters is - properly - displayed. Previouslt, character vectors were plotted on top of - each - other. + * [r277] - Mark sprint() as depreciated. - Replace references to + sprint with capture.output() - Use match.arg for halign and + valign arguments to textplot.default. - Fix textplot.character so + that a vector of characters is properly displayed. Previouslt, + character vectors were plotted on top of each other. 2003-12-03 warnes @@ -735,11 +862,14 @@ 2003-11-21 warnes * [r237] Removed 'deqn' call that was confusing things. + * [r234] Add email address to author field + * [r233] - new files - * [r232] - Change 'T' to 'TRUE' in mixedsort.R - - Add missing brace in mixedsort.Rd + * [r232] - Change 'T' to 'TRUE' in mixedsort.R - Add missing brace + in mixedsort.Rd + 2003-11-20 warnes * [r230] - Move 'odd' and 'even' functions to a separate file & @@ -757,42 +887,42 @@ 2003-05-23 warnes * [r196] - library() backported from 1.7-devel. This version of the - function - adds the "pos=" argument to specify where in the search path the - library should be placed. - + function adds the "pos=" argument to specify where in the search + path the library should be placed. + - updated .First.lib to use library(...pos=3) for MASS to avoid - the - 'genotype' data set in MASS from masking the genotype funciton in - genetics when it loads gregmisc - + the 'genotype' data set in MASS from masking the genotype + funciton in genetics when it loads gregmisc + - Added logit() inv.logit() matchcols() function and corresponding docs 2003-04-22 warnes * [r189] - Fixed tpyo in example that allowed combinations(500,2) - to run when - it should have been ignred for testing.. + to run when it should have been ignred for testing.. 2003-04-10 warnes * [r186] - Added note about the need to increase - options("expressions") to use - large values for 'n'. Prompted by bug report from Huan Huang - n provided - repeat.allowed=TRUE - - Bumped up version number + contributed by Marc Schwartz. - Permit combinations() to be used + when r>n provided repeat.allowed=TRUE - Bumped up version number 2002-08-01 warnes * [r114] - Corrected documentation mismatch for ci, ci.default. - + - Replaced all occurences of '_' for assignment with '<-'. - + - Replaced all occurences of 'T' or 'F' for 'TRUE' and 'FALSE' - with - the spelled out version. - + with the spelled out version. + - Updaded version number and date. 2002-04-09 warneg @@ -860,26 +986,26 @@ 2002-03-26 warneg * [r97] Initial Checkin + * [r96] Initial checkin. 2002-03-20 warneg * [r91] - Added definition of is.R function. - + - Added boxplot.formula 2002-03-07 warneg * [r90] - Added documentation and example for running2 + * [r89] - Added "running2", which handles both univariate and - bivariate cases - - Modified "running" to call "running2" + bivariate cases - Modified "running" to call "running2" 2002-02-05 warneg * [r75] - Fix typo that caused code meant to run only under S-Plus - to run - under R, causing problems. + to run under R, causing problems. 2001-12-19 warneg @@ -892,12 +1018,15 @@ 2001-09-01 warneg * [r17] Initial checkin. + * [r16] Release 0.3.0 2001-08-25 warneg * [r13] Initial CVS checkin. + * [r11] Fixed a typo and a syntax error. + * [r7] Initial Checkin 2001-06-29 warneg Modified: pkg/gtools/inst/NEWS =================================================================== --- pkg/gtools/inst/NEWS 2017-06-12 22:53:23 UTC (rev 2161) +++ pkg/gtools/inst/NEWS 2017-06-12 23:21:20 UTC (rev 2162) @@ -1,3 +1,38 @@ +gtools 3.7.0 - 2017-06-11 +------------------------- + +New functions: + +- Add capwords() function to apply standard capitalization rules + to a character string. + +Enhancements: + +- Add 'con' argument to ask() to allow specification of the + connection to query for input. For use under RStudio, use + ask(..., con=file('stdin')). + +- R/na.replace.R, man/na.replace.Rd: na.replace() now + accepts a function to provide the replcement value. + +- smartbind() has a new argument 'list' to pass a list of data frames, + /instead of/in addition to/ data frames as arguments. + +Bug Fixes: + +- smartbind() now works properly with empty column names + +- Correct error in smartbind() when column types don't + match. + +- Fix bug in smartbind's handling of factor levels. + +- Improve assignment of default names in smartbind(). + +- loadedPackages() to return data silently so that the results + don't get printed twice. + + gtools 3.5.0 - 2015-04-28 ------------------------- @@ -16,7 +51,7 @@ - New assignEdgewise() function for making assignments into locked environments. (Used by unByteCodeAssign().) -Enhacements: +Enhancements: - mixedsort() and mixedorder() now have arguments 'decreasing', 'na.last', and 'blank.last' arguments to control sort ordering. From noreply at r-forge.r-project.org Tue Jun 13 01:28:04 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:28:04 +0200 (CEST) Subject: [R-gregmisc-commits] r2163 - pkg/gtools/man Message-ID: <20170612232804.533C9188B9D@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:28:03 +0200 (Tue, 13 Jun 2017) New Revision: 2163 Modified: pkg/gtools/man/capwords.Rd Log: Update link for taxise::taxize_capwords in gtools::capwords man page Modified: pkg/gtools/man/capwords.Rd =================================================================== --- pkg/gtools/man/capwords.Rd 2017-06-12 23:21:20 UTC (rev 2162) +++ pkg/gtools/man/capwords.Rd 2017-06-12 23:28:03 UTC (rev 2163) @@ -34,13 +34,14 @@ Fogarty, Mignon. Capitalizing Titles: "Which words should you capitalize? Grammar Girl's Quick and Dirty Tips for Better Writing. 9 Jun. 2011. Quick and Dirty Tips Website." Accessed 22 April 2016 \url{http://www.quickanddirtytips.com/education/grammar/capitalizing-titles} } \author{ -Gregory R. Warnes \email{greg at warnes.net} based on code from the \code{\link[base]{chartr}} manual page, +Gregory R. Warnes \email{greg at warnes.net} based on code from the +\code{\link[base]{chartr}} manual page, and \code{\link[taxize]{capwords}} in the taxize package. } \seealso{ \code{\link[base]{chartr}}, -\code{\link[taxize]{capwords}}, +\code{\link[taxize]{taxize_capwords}}, \code{\link[SGP]{capwords}} } \examples{ From noreply at r-forge.r-project.org Tue Jun 13 01:28:22 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:28:22 +0200 (CEST) Subject: [R-gregmisc-commits] r2164 - pkg/gtools/inst Message-ID: <20170612232822.AC6AF188B9D@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:28:22 +0200 (Tue, 13 Jun 2017) New Revision: 2164 Modified: pkg/gtools/inst/ChangeLog Log: Fix typos Modified: pkg/gtools/inst/ChangeLog =================================================================== --- pkg/gtools/inst/ChangeLog 2017-06-12 23:28:03 UTC (rev 2163) +++ pkg/gtools/inst/ChangeLog 2017-06-12 23:28:22 UTC (rev 2164) @@ -13,20 +13,13 @@ * [r2158] R/capwords.R, man/capwords.Rd: Add capwords() function to apply standard capitalization rules to a scharacter string. -2017-05-23 warnes - - * [r2145] R/ask.R, R/quantcut.R, R/smartbind.R: - Integrate changes - made by Mango Solutions at - https://github.com/MangoTheCat/SASxport. - Remove functions - duplicated from the Hmisc package. - Minor code cleanup. - 2016-08-24 warnes * [r2144] tests/test_setTCPNoDelay.R: Add more testing code. 2016-08-15 warnes - * [r2143] inst/ChangeLog: Update ChangeLog + * [r2143] inst/ChangeLog: Update ChangeLogtaxi * [r2142] DESCRIPTION: Update version number and date @@ -51,7 +44,7 @@ 2015-11-24 warnes * [r2071] R/smartbind.R: Correct error when column types don't - match (reported by + match. 2015-10-15 warnes From noreply at r-forge.r-project.org Tue Jun 13 01:30:15 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:30:15 +0200 (CEST) Subject: [R-gregmisc-commits] r2165 - pkg/gtools/man Message-ID: <20170612233016.0DB3E188E38@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:30:15 +0200 (Tue, 13 Jun 2017) New Revision: 2165 Modified: pkg/gtools/man/capwords.Rd Log: Update link for taxise::taxize_capwords in gtools::capwords man page Modified: pkg/gtools/man/capwords.Rd =================================================================== --- pkg/gtools/man/capwords.Rd 2017-06-12 23:28:22 UTC (rev 2164) +++ pkg/gtools/man/capwords.Rd 2017-06-12 23:30:15 UTC (rev 2165) @@ -36,7 +36,7 @@ \author{ Gregory R. Warnes \email{greg at warnes.net} based on code from the \code{\link[base]{chartr}} manual page, -and \code{\link[taxize]{capwords}} +and \code{\link[taxize]{taxize_capwords}} in the taxize package. } \seealso{ From noreply at r-forge.r-project.org Tue Jun 13 01:53:02 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:53:02 +0200 (CEST) Subject: [R-gregmisc-commits] r2166 - pkg/gmodels Message-ID: <20170612235302.321C31881F4@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:53:01 +0200 (Tue, 13 Jun 2017) New Revision: 2166 Modified: pkg/gmodels/NAMESPACE Log: Add imports for base R packages to NAMESPACE Modified: pkg/gmodels/NAMESPACE =================================================================== --- pkg/gmodels/NAMESPACE 2017-06-12 23:30:15 UTC (rev 2165) +++ pkg/gmodels/NAMESPACE 2017-06-12 23:53:01 UTC (rev 2166) @@ -35,3 +35,7 @@ importFrom(MASS, ginv) importFrom(gdata, frameApply) importFrom(gdata, nobs) + +importFrom(stats, chisq.test, coef, family, fisher.test, + mcnemar.test, pchisq, pf, pt, qbeta, qt, sd, + summary.glm, summary.lm) From noreply at r-forge.r-project.org Tue Jun 13 01:53:33 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 01:53:33 +0200 (CEST) Subject: [R-gregmisc-commits] r2167 - pkg/gmodels Message-ID: <20170612235333.9E3781881F4@r-forge.r-project.org> Author: warnes Date: 2017-06-13 01:53:33 +0200 (Tue, 13 Jun 2017) New Revision: 2167 Modified: pkg/gmodels/DESCRIPTION Log: Update imports Modified: pkg/gmodels/DESCRIPTION =================================================================== --- pkg/gmodels/DESCRIPTION 2017-06-12 23:53:01 UTC (rev 2166) +++ pkg/gmodels/DESCRIPTION 2017-06-12 23:53:33 UTC (rev 2167) @@ -11,7 +11,7 @@ Description: Various R programming tools for model fitting Depends: R (>= 1.9.0) Suggests: gplots, gtools, Matrix, nlme, lme4 (>= 0.999999-0) -Imports: MASS, gdata +Imports: MASS, gdata, stats License: GPL-2 URL: http://www.sf.net/projects/r-gregmisc NeedsCompilation: no From noreply at r-forge.r-project.org Tue Jun 13 02:16:17 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 13 Jun 2017 02:16:17 +0200 (CEST) Subject: [R-gregmisc-commits] r2168 - pkg/gtools/man Message-ID: <20170613001617.B0C31188B38@r-forge.r-project.org> Author: warnes Date: 2017-06-13 02:16:17 +0200 (Tue, 13 Jun 2017) New Revision: 2168 Modified: pkg/gtools/man/combinations.Rd pkg/gtools/man/defmacro.Rd Log: Update R News URLS Modified: pkg/gtools/man/combinations.Rd =================================================================== --- pkg/gtools/man/combinations.Rd 2017-06-12 23:53:33 UTC (rev 2167) +++ pkg/gtools/man/combinations.Rd 2017-06-13 00:16:17 UTC (rev 2168) @@ -36,7 +36,7 @@ Returns a matrix where each row contains a vector of length \code{r}. } \references{Venables, Bill. "Programmers Note", R-News, Vol 1/1, - Jan. 2001. \url{http://cran.r-project.org/doc/Rnews} } + Jan. 2001. \url{http://cran.r-project.org/doc/Rnews/} } \author{ Original versions by Bill Venables \email{Bill.Venables at cmis.csiro.au}. Extended to handle \code{repeats.allowed} by Gregory R. Warnes Modified: pkg/gtools/man/defmacro.Rd =================================================================== --- pkg/gtools/man/defmacro.Rd 2017-06-12 23:53:33 UTC (rev 2167) +++ pkg/gtools/man/defmacro.Rd 2017-06-13 00:16:17 UTC (rev 2168) @@ -61,7 +61,7 @@ The original \code{defmacro} code was directly taken from: Lumley T. "Programmer's Niche: Macros in R", R News, 2001, Vol 1, - No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} + No. 3, pp 11--13, \url{http://cran.r-project.org/doc/Rnews/} } \author{ Thomas Lumley wrote \code{defmacro}. Gregory R. Warnes \email{greg at warnes.net} enhanced it and created From noreply at r-forge.r-project.org Wed Jun 14 21:43:00 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 14 Jun 2017 21:43:00 +0200 (CEST) Subject: [R-gregmisc-commits] r2169 - in pkg/gtools: . R man src tests Message-ID: <20170614194300.2255A188101@r-forge.r-project.org> Author: warnes Date: 2017-06-14 21:42:59 +0200 (Wed, 14 Jun 2017) New Revision: 2169 Added: pkg/gtools/src/gtools.h pkg/gtools/src/gtools_load.c Modified: pkg/gtools/DESCRIPTION pkg/gtools/NAMESPACE pkg/gtools/R/checkRVersion.R pkg/gtools/R/newVersionAvailable.R pkg/gtools/R/roman2int.R pkg/gtools/R/setTCPNoDelay.R pkg/gtools/man/combinations.Rd pkg/gtools/man/defmacro.Rd pkg/gtools/src/setTCPNoDelay.c pkg/gtools/tests/test_setTCPNoDelay.R Log: Explicitly register C routines used by gtools Modified: pkg/gtools/DESCRIPTION =================================================================== --- pkg/gtools/DESCRIPTION 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/DESCRIPTION 2017-06-14 19:42:59 UTC (rev 2169) @@ -23,7 +23,7 @@ - generate significance stars from p-values ('stars.pval'), - convert characters to/from ASCII codes. Version: 3.7.0 -Date: 2017-06-11 +Date: 2017-06-14 Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley Maintainer: Gregory R. Warnes License: GPL-2 Modified: pkg/gtools/NAMESPACE =================================================================== --- pkg/gtools/NAMESPACE 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/NAMESPACE 2017-06-14 19:42:59 UTC (rev 2169) @@ -51,3 +51,9 @@ importFrom("utils", "available.packages", "flush.console", "head", "help.search", "installed.packages", "modifyList", "packageVersion") + +# Refer to all C routines by their name prefixed by C_ +useDynLib(gtools, .registration = TRUE, .fixes = "C_") + + + Modified: pkg/gtools/R/checkRVersion.R =================================================================== --- pkg/gtools/R/checkRVersion.R 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/R/checkRVersion.R 2017-06-14 19:42:59 UTC (rev 2169) @@ -1,12 +1,12 @@ checkRVersion <- function(quiet=FALSE) { - page2 <- scan(file="http://cran.r-project.org/src/base/R-2", + page2 <- scan(file="https://cran.r-project.org/src/base/R-2", what="", quiet=TRUE) - page3 <- scan(file="http://cran.r-project.org/src/base/R-3", + page3 <- scan(file="https://cran.r-project.org/src/base/R-3", what="", quiet=TRUE) combined <- c(page2, page3) - + matches <- grep("R-[0-9]\\.[0-9]+\\.[0-9]+", combined, value=TRUE) versionList <- gsub("^.*R-([0-9].[0-9]+.[0-9]+).*$","\\1",matches) versionList <- numeric_version(versionList) @@ -30,5 +30,5 @@ } invisible( NULL ); } - + } Modified: pkg/gtools/R/newVersionAvailable.R =================================================================== --- pkg/gtools/R/newVersionAvailable.R 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/R/newVersionAvailable.R 2017-06-14 19:42:59 UTC (rev 2169) @@ -1,6 +1,6 @@ newVersionAvailable <- function(quiet=FALSE) { - page <- scan(file="http://cran.r-project.org/src/base/R-2", what="", quiet=TRUE) + page <- scan(file="https://cran.r-project.org/src/base/R-2", what="", quiet=TRUE) matches <- grep("R-[0-9]\\.[0-9]+\\.[0-9]+", page, value=TRUE) versionList <- gsub("^.*R-([0-9].[0-9]+.[0-9]+).*$","\\1",matches) versionList <- numeric_version(versionList) @@ -24,5 +24,5 @@ } invisible( NULL ); } - + } Modified: pkg/gtools/R/roman2int.R =================================================================== --- pkg/gtools/R/roman2int.R 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/R/roman2int.R 2017-06-14 19:42:59 UTC (rev 2169) @@ -8,7 +8,7 @@ romandigit.convert <- function(roman) { - retval <- .C('convert', + retval <- .C(C_convert, roman=as.character(roman), nchar=as.integer(nchar(roman)), values=integer(nchar(roman)) @@ -18,7 +18,7 @@ roman2int.inner <- function(roman) { - results <- .C("roman2int", + results <- .C(C_roman2int, roman = as.character(roman), nchar = as.integer(nchar(roman)), value = integer(1), Modified: pkg/gtools/R/setTCPNoDelay.R =================================================================== --- pkg/gtools/R/setTCPNoDelay.R 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/R/setTCPNoDelay.R 2017-06-14 19:42:59 UTC (rev 2169) @@ -9,15 +9,13 @@ conn <- getConnection(socket[1]) else conn <- socket - - - retval <- .C("R_setTCPNoDelay", - socket=as.integer(socket[1]), - flag=as.integer(value), - status=integer(1), - status.str=as.character(buffer), - status.len=as.integer(nchar(buffer)), - package="gtools" + + retval <- .C(C_setTCPNoDelay, + socket = as.integer(socket[1]), + flag = as.integer(value), + status = integer(1), + status.str = as.character(buffer), + status.len = as.integer(nchar(buffer)) ) if(retval$status != 0) Modified: pkg/gtools/man/combinations.Rd =================================================================== --- pkg/gtools/man/combinations.Rd 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/man/combinations.Rd 2017-06-14 19:42:59 UTC (rev 2169) @@ -36,7 +36,7 @@ Returns a matrix where each row contains a vector of length \code{r}. } \references{Venables, Bill. "Programmers Note", R-News, Vol 1/1, - Jan. 2001. \url{http://cran.r-project.org/doc/Rnews/} } + Jan. 2001. \url{https://cran.r-project.org/doc/Rnews/} } \author{ Original versions by Bill Venables \email{Bill.Venables at cmis.csiro.au}. Extended to handle \code{repeats.allowed} by Gregory R. Warnes @@ -53,6 +53,6 @@ # To use large 'n', you need to change the default recusion limit options(expressions=1e5) cmat <- combinations(300,2) -dim(cmat) # 44850 by 2 +dim(cmat) # 44850 by 2 } \keyword{ manip } Modified: pkg/gtools/man/defmacro.Rd =================================================================== --- pkg/gtools/man/defmacro.Rd 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/man/defmacro.Rd 2017-06-14 19:42:59 UTC (rev 2169) @@ -50,7 +50,7 @@ a C programmer might expect \code{mul(i, j + k)} to expand (incorrectly) to \code{i*j + k}. In fact it expands correctly, to the equivalent of \code{i*(j + k)}. - + For a discussion of the differences between functions and macros, please Thomas Lumley's R-News article (reference below). } @@ -61,7 +61,7 @@ The original \code{defmacro} code was directly taken from: Lumley T. "Programmer's Niche: Macros in R", R News, 2001, Vol 1, - No. 3, pp 11--13, \url{http://cran.r-project.org/doc/Rnews/} + No. 3, pp 11--13, \url{https://cran.r-project.org/doc/Rnews/} } \author{ Thomas Lumley wrote \code{defmacro}. Gregory R. Warnes \email{greg at warnes.net} enhanced it and created @@ -112,7 +112,7 @@ ### # String macro (note the quoted text in the calls below) -# +# # This style of macro can be useful when you are reading # function arguments from a text file ### @@ -121,7 +121,7 @@ ) plot.s( "d", "V1") -plot.s( DF="d", VAR="V1", COL='"blue"' ) +plot.s( DF="d", VAR="V1", COL='"blue"' ) plot.s( "d", "V1", DOTS='lwd=4') # use optional 'DOTS' argument Added: pkg/gtools/src/gtools.h =================================================================== --- pkg/gtools/src/gtools.h (rev 0) +++ pkg/gtools/src/gtools.h 2017-06-14 19:42:59 UTC (rev 2169) @@ -0,0 +1,29 @@ +#include +#include +#include + +void setTCPNoDelay(int *socket, + int* flag, + int* status, + char** status_str, + int* status_len +); + +void convert(char** letters, + int* nchar, + int* values +); + + +void roman2int(char** str, + int* nchar, + int* retval); + + +R_CMethodDef cMethods[] = { + {"setTCPNoDelay", (DL_FUNC) &setTCPNoDelay, 5}, + {"convert", (DL_FUNC) &convert, 3}, + {"roman2int", (DL_FUNC) &roman2int, 3}, + {NULL, NULL, 0} +}; + Added: pkg/gtools/src/gtools_load.c =================================================================== --- pkg/gtools/src/gtools_load.c (rev 0) +++ pkg/gtools/src/gtools_load.c 2017-06-14 19:42:59 UTC (rev 2169) @@ -0,0 +1,14 @@ +#include "gtools.h" + +void R_init_gtools(DllInfo *info) +{ + /* Register C routines */ + R_registerRoutines (info, cMethods, NULL, NULL, NULL); + R_useDynamicSymbols(info, FALSE); + R_forceSymbols (info, TRUE); +} + +void R_unload_gtools(DllInfo *info) +{ + /* Release resources. */ +} Modified: pkg/gtools/src/setTCPNoDelay.c =================================================================== --- pkg/gtools/src/setTCPNoDelay.c 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/src/setTCPNoDelay.c 2017-06-14 19:42:59 UTC (rev 2169) @@ -29,7 +29,7 @@ ERRNO ":" DESCR, status_len); break; -#endif +#endif @@ -61,7 +61,7 @@ CASE_ERR(WSAENOPROTOOPT, "he option is unknown or unsupported for the specified provider or socket (see SO_GROUP_PRIORITY limitations)."); CASE_ERR(WSAENOTCONN, "Connection has been reset when SO_KEEPALIVE is set."); CASE_ERR(WSAENOTSOCK, "The descriptor is not a socket."); - + case 0: strncpy( status_str, "SUCCESS", @@ -69,7 +69,7 @@ break; default: - strncpy(status_str, strerror(status), status_len); + strncpy(status_str, strerror(status), status_len); break; } @@ -78,17 +78,17 @@ /* Function to de-nagle a TCP socket connection */ -void R_setTCPNoDelay(int *socket, +void setTCPNoDelay(int *socket, int* flag, int* status, char** status_str, int* status_len) { int off; - + /* ensure that we use only 0,1 values */ off = (*flag) ? 1 : 0; - + *status = setsockopt( *socket, IPPROTO_TCP, @@ -99,43 +99,6 @@ checkStatus(errno, status_str[0], *status_len); - + return; } - -/* function to check socket options */ -/* NOT USED... -void R_getsockopt(int *s, - int *level, - int *optname, - int *optval, - int *optlen, - int *status, - char *status_str, - int *status_len) -{ - *status = getsockopt(*s, *level, *optname, optval, optlen); - - checkStatus(*status, status_str, *status_len); - -} -*/ - -/* function to set socket options */ -/* NOT USED ... -void R_setsockopt(int *s, - int *level, - int *optname, - int *optval, - int *optlen, - int *status, - char *status_str, - int *status_len) -{ - - *status = setsockopt(*s, *level, *optname, optval, *optlen); - - checkStatus(*status, status_str, *status_len); -} -*/ - Modified: pkg/gtools/tests/test_setTCPNoDelay.R =================================================================== --- pkg/gtools/tests/test_setTCPNoDelay.R 2017-06-13 00:16:17 UTC (rev 2168) +++ pkg/gtools/tests/test_setTCPNoDelay.R 2017-06-14 19:42:59 UTC (rev 2169) @@ -1,35 +1,5 @@ library('gtools') -setTCPNoDelay <- function( socket, value=TRUE ) -{ - if(!any(c("socket","sockconn") %in% class(socket))) - stop("socket must be a socket object") - - buffer <- paste(rep(" ", 1000), sep='', collapse='') - - if("sockconn" %in% class(socket)) - conn <- getConnection(socket[1]) - else - conn <- socket - - - retval <- .C("R_setTCPNoDelay", - socket=as.integer(socket[1]), - flag=as.integer(value), - status=integer(1), - status.str=as.character(buffer), - status.len=as.integer(nchar(buffer)), - package="gtools" - ) - - if(retval$status != 0) - stop( retval$status.str ) - else - invisible(retval$status.str) -} - - - host <- "www.r-project.org" socket <- make.socket(host, 80) print(socket) @@ -38,6 +8,5 @@ write.socket(socket, "GET /\n\n") write.socket(socket, "A") write.socket(socket, "B\n") -while( (str <- read.socket(socket)) > "") - cat(str) +while( (str <- read.socket(socket)) > "") cat(str) close.socket(socket) From noreply at r-forge.r-project.org Wed Jun 14 21:44:50 2017 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 14 Jun 2017 21:44:50 +0200 (CEST) Subject: [R-gregmisc-commits] r2170 - pkg/gtools/inst Message-ID: <20170614194450.681AD188101@r-forge.r-project.org> Author: warnes Date: 2017-06-14 21:44:49 +0200 (Wed, 14 Jun 2017) New Revision: 2170 Modified: pkg/gtools/inst/ChangeLog pkg/gtools/inst/NEWS Log: Update NEWS and ChangeLog Modified: pkg/gtools/inst/ChangeLog =================================================================== --- pkg/gtools/inst/ChangeLog 2017-06-14 19:42:59 UTC (rev 2169) +++ pkg/gtools/inst/ChangeLog 2017-06-14 19:44:49 UTC (rev 2170) @@ -1,10 +1,34 @@ +2017-06-14 warnes + + * [r2169] DESCRIPTION, NAMESPACE, R/checkRVersion.R, + R/newVersionAvailable.R, R/roman2int.R, R/setTCPNoDelay.R, + man/combinations.Rd, man/defmacro.Rd, src/gtools.h[ADD], + src/gtools_load.c[ADD], src/setTCPNoDelay.c, + tests/test_setTCPNoDelay.R: Explicitly register C routines used + by gtools + +2017-06-13 warnes + + * [r2168] man/combinations.Rd, man/defmacro.Rd: Update R News URLS + 2017-06-12 warnes + * [r2165] man/capwords.Rd: Update link for taxise::taxize_capwords + in gtools::capwords man page + + * [r2164] inst/ChangeLog: Fix typos + + * [r2163] man/capwords.Rd: Update link for taxise::taxize_capwords + in gtools::capwords man page + + * [r2162] DESCRIPTION, NAMESPACE, inst/ChangeLog, inst/NEWS: Update + meta files for gtools 3.7.0 + * [r2161] tests/smartbind_emptynames.R: Fix test for smartbind with empty column names * [r2160] man/setTCPNoDelay.Rd, tests/test_setTCPNoDelay.R: Add - improved example to man page for setTCPNoDelay() and fix test + improved example to man page for setTCPnoDelat() and fix test function. * [r2159] man/ask.Rd: Add 'con' argument to ask() to allow @@ -13,13 +37,20 @@ * [r2158] R/capwords.R, man/capwords.Rd: Add capwords() function to apply standard capitalization rules to a scharacter string. +2017-05-23 warnes + + * [r2145] R/ask.R, R/quantcut.R, R/smartbind.R: - Integrate changes + made by Mango Solutions at + https://github.com/MangoTheCat/SASxport. - Remove functions + duplicated from the Hmisc package. - Minor code cleanup. + 2016-08-24 warnes * [r2144] tests/test_setTCPNoDelay.R: Add more testing code. 2016-08-15 warnes - * [r2143] inst/ChangeLog: Update ChangeLogtaxi + * [r2143] inst/ChangeLog: Update ChangeLog * [r2142] DESCRIPTION: Update version number and date @@ -44,7 +75,7 @@ 2015-11-24 warnes * [r2071] R/smartbind.R: Correct error when column types don't - match. + match (reported by 2015-10-15 warnes @@ -88,10 +119,10 @@ gdata::trim() or base::trimws() (added in R 3.2.0). The previous solution was to include gdata/R/gdata/R/trim.R in gtools using a symbolic link. - + Unfortunately, Rforge doesn't seem to like the symbolic link when building packages, and generates an error. - + So, instead, create the file trimws.R, which creates trimws() if it isn't already available (e.g. via base::trimws), and modify keywords() and roman2int() to use trimws() instead of @@ -332,14 +363,14 @@ * [r1748] mixedorder() was failing to correctly handle numbers including decimals due to a faulty regular expression. Prior to the fix: - + > drr [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" > gtools::mixedsort(drr) [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" After the fix: - + > drr [1] "Dose 0.3 mg" "Dose 0.04 mg" "Dose 0.5 mg" > mixedsort(drr) [1] "Dose 0.04 mg" "Dose 0.3 mg" "Dose 0.5 mg" - + In addition, an optimization was added that checked if the input vector was numeric. If so, simply use the existing base::order function. @@ -687,7 +718,7 @@ 2005-08-31 warnes * [r645] Adding the defmacro() function, extracted from - + Lumley T. "Programmer's Niche: Macros in {R}", R News, 2001, Vol 1, No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} @@ -882,11 +913,11 @@ * [r196] - library() backported from 1.7-devel. This version of the function adds the "pos=" argument to specify where in the search path the library should be placed. - + - updated .First.lib to use library(...pos=3) for MASS to avoid the 'genotype' data set in MASS from masking the genotype funciton in genetics when it loads gregmisc - + - Added logit() inv.logit() matchcols() function and corresponding docs @@ -964,12 +995,12 @@ 2002-08-01 warnes * [r114] - Corrected documentation mismatch for ci, ci.default. - + - Replaced all occurences of '_' for assignment with '<-'. - + - Replaced all occurences of 'T' or 'F' for 'TRUE' and 'FALSE' with the spelled out version. - + - Updaded version number and date. 2002-04-09 warneg @@ -985,7 +1016,7 @@ 2002-03-20 warneg * [r91] - Added definition of is.R function. - + - Added boxplot.formula 2002-03-07 warneg Modified: pkg/gtools/inst/NEWS =================================================================== --- pkg/gtools/inst/NEWS 2017-06-14 19:42:59 UTC (rev 2169) +++ pkg/gtools/inst/NEWS 2017-06-14 19:44:49 UTC (rev 2170) @@ -1,4 +1,4 @@ -gtools 3.7.0 - 2017-06-11 +gtools 3.7.0 - 2017-06-14 ------------------------- New functions: @@ -18,6 +18,8 @@ - smartbind() has a new argument 'list' to pass a list of data frames, /instead of/in addition to/ data frames as arguments. +- Internal changes to bring code up to current CRAN guidelines. + Bug Fixes: - smartbind() now works properly with empty column names