[Rd] Proposed diff.character() method

2022-03-08 Thread Arni Magnusson
Dear R developers, Recently, I was busy comparing different versions of several packages. Tired of going back and forth between R and diff, I created a simple file comparison function in R that I found quite useful. For an efficient and familiar interface I called it diff.character() and ran

Re: [Rd] stringsAsFactors and type.convert()

2020-04-20 Thread Arni Magnusson
. Looking forward to the 4.0.0 official release - all positive changes! All the best, Arni From: Martin Maechler Sent: Monday, April 20, 2020 6:23:31 PM To: Arni Magnusson Cc: r-devel@r-project.org Subject: Re: [Rd] stringsAsFactors and type.convert() >>&g

[Rd] stringsAsFactors and type.convert()

2020-04-13 Thread Arni Magnusson
If read.table() is defaulting to "character" instead of "factor" data type, shouldn't type.convert() also default to "character" in R 4.0.0? This would seem like a good time to change the default to type.convert(as.is=TRUE), to align it with the new default in read.table and data.frame. I

Re: [Rd] ASCIIfy() - a proposal for package:tools

2014-04-17 Thread Arni Magnusson
Thanks Duncan, for considering ASCIIfy. I understand your reasoning. This is a recurring pattern - I propose functions for core R, and Greg catches them from freefall :) I'm delighted with ASCIIfy being hosted in gtools. The R and Rd should be ready as is. Cheers, Arni

[Rd] ASCIIfy() - a proposal for package:tools

2014-04-15 Thread Arni Magnusson
{fallback}{an output character to use, when input characters cannot be converted.} } \value{ A character vector like \code{x}, except non-ASCII characters have been replaced with \samp{\x00} or \samp{\u} codes. } \author{Arni Magnusson.} \note{ To render single backslashes, use

Re: [Rd] Statistical mode

2011-05-27 Thread Arni Magnusson
Thank you, Kevin, for the feedback. 1. The mode is not so interesting for continuous data. I would much rather use something like density(). Absolutely. The help page for statmode() says it is for discrete data, and points to density() for continuous data. 2. Both the iris and barley data

[Rd] Statistical mode

2011-05-26 Thread Arni Magnusson
One descriptive statistic that is conspicuously missing from core R is the statistical mode - the most frequent value in a discrete distribution. I would like to propose adding the attached 'statmode' (or a similar function) to the 'stats' package. Currently, it can be quite cumbersome to

[Rd] Drop single-dimensional array

2010-09-08 Thread Arni Magnusson
to a vector, while retaining its names. Or I may well be missing something obvious. Best regards, Arni On Wed, 8 Sep 2010, Simon Urbanek wrote: wrong address - did you mean R-devel? Simon On Sep 6, 2010, at 8:35 AM, Arni Magnusson wrote: Bug or not, I was surprised by this behavior

[Rd] areaplot

2010-06-14 Thread Arni Magnusson
contain \code{NA} values. The default is to ignore missing values in the given variables.} \item{\dots}{further arguments passed to \code{matplot} and \code{polygon}.} } \value{ Matrix of cumulative sums that was used for plotting. } \author{ Arni Magnusson. } \seealso

[Rd] update.packages(1)

2010-03-25 Thread Arni Magnusson
I'm relaying a question from my institute's sysadmin: Would it be possible to modify update.packages() and related functions so that 'lib.loc' accepts integer values to specify a library from the .libPaths() vector? Many Linux users want to update all user packages (inside the R_LIBS_USER

[Rd] Rounding multinomial proportions

2010-02-11 Thread Arni Magnusson
. Modified Sainte-Laguë is used in Norway and Sweden. Sainte-Laguë is used in Bosnia and Herzegovina, Kosovo, Latvia, and New Zealand. } \author{Arni Magnusson.} \references{ Balinski, M. and V. Ramírez. 1999. Parametric methods of apportionment, rounding and production. \emph

Re: [Rd] Rounding multinomial proportions

2010-02-11 Thread Arni Magnusson
, the first paragraph should end with where the other multinomial functions reside. Revision 2, Arni On Thu, 11 Feb 2010, Arni Magnusson wrote: I present you with a function that solves a problem that has bugged me for many years. I think the problem may be general enough to at least consider

Re: [Rd] Model frame when LHS is cbind (PR#14189)

2010-01-21 Thread Arni Magnusson
Thank you Prof. Ripley, for examining this issue. I have two more questions on this topic, if I may. (1) Truncated column names With your explanations I can see that the problem of missing column names originates in cbind() and the 'deparse.level' bug we have just discovered. I had tried