is available at
http://www.timhesterberg.net/r-packages
Here is the inst/doc/missingValues.txt file from that package:
--
Copyright 2012 Google Inc. All Rights Reserved.
Author: Tim Hesterberg roc...@google.com
Distributed under GPL 2 or later
I suggest adding this to R_HOME/doc/KEYWORDS.db:
Programming|testing: Software testing
and add a corresponding entry in R_HOME/doc/KEYWORDS.
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
I did some benchmarking of data frame code, and
it appears that R 3.0.0 is far worse than earlier versions of R
in terms of how many large objects it allocates space for,
for data frame operations - creation, subscripting, subscript replacement.
For a data frame with n rows, it makes either 2 or 4
Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
Martin
Best,
luke
On Sun, 14 Apr 2013, Tim Hesterberg wrote:
I did some benchmarking of data frame code, and
it appears that R 3.0.0 is far worse than earlier versions of R
in terms of how many large objects
On Sep 11, 2012, at 16:02 , Warnes, Gregory wrote:
On 9/7/12 2:42 PM, peter dalgaard pda...@gmail.com wrote:
On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote:
I suggest adding a 'pivot' argument to qr.R, to obtain columns in the
same order as the original x, so that
a - qr(x)
qr.Q
When creating a package, I would like a way to tell R that
a function with a period in its name is not a method.
I'm writing a package now with a modified version of qr.R.
R CMD check gives warnings:
* checking S3 generic/method consistency ... WARNING
qr:
function(x, ...)
qr.R:
function(qr,
I've been playing with passing arguments to .C(), and found that replacing
as.double(x)
with
if(is.double(x)) x else as.double(x)
saves time and avoids one copy, in the case that x is already double.
I suggest modifying as.double to avoid the extra copy and just
return x, when x is
In base/R/tabulate.R, tabulate() calls .C(R_tabulate;
I suggest adding DUP = FALSE to that call.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
this information.
Tim Hesterberg
--
% File src/library/base/man/qraux.Rd
% Part of the R package, http://www.R-project.orghttp://www.r-project.org/
% Copyright 1995-2007 R Core Development Team
% Distributed under GPL 2 or later
\name{QR.Auxiliaries}
\title
I also favor deprecating mean.data.frame.
One possible exception would be for a single-column data frame.
But even here I'd say no, lest people expect the same behavior for
median, var, ...
Pat's suggestion of using stop() would work nicely for mean.
(but omit paste - stop handles that).
Tim
For consistency with rowSums colSums rowMeans etc., the names should be
colMins colMaxs
rowMins rowMaxs
This is also consistent with S+.
FYI, the rowSums naming convention was chosen to avoid conflict
with rowsum (which computes column sums!).
Tim Hesterberg
A well-designed API
Having aperm() return an object of the same class is dangerous, there
are undoubtedly classes for which that is not appropriate, producing an
illegal object for that class or quietly giving incorrect results.
Three alternatives are to:
* add the keep.class option but with default FALSE
* make
three are undefined for samples of size 1. You need to go to some
other bootstrap, e.g. a parametric bootstrap with variability estimated
from other data.
Tim Hesterberg
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
(x0, y0, x1 = x0, y1 = y0, col = par(fg), lty = par(lty),
---
function (x0, y0, x1, y1, col = par(fg), lty = par(lty),
Arrows:
function (x0, y0, x1 = x0, y1 = y0, length = 0.25, angle = 30, code = 2,
---
function (x0, y0, x1, y1, length = 0.25, angle = 30, code = 2,
Tim Hesterberg
A number of as.data.frame methods do
names(x) - NULL
Replacing that with
if(!is.null(names(x)))
names(x) - NULL
appears to save making one copy of the data
(based on tracemem and Rprofmem in a copy of R compiled
with --enable-memory-profiling)
and gives a modest but consistent
is
a big waste of time when working with large data frames. I'll comment
more on this in a new thread.
Tim Hesterberg
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
'dup.row.names' is for consistency with S+; there the options
are NULL, F or T.
Tim Hesterberg
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Others have commented on why this holds.
There is an alternative, 'ifelse1', part of the splus2R package, that
does what you'd like here.
Tim Hesterberg
I find it slightly surprising, that
ifelse(TRUE, character(0), )
returns NA instead of character(0).
--
Heikki Kaskelma
appears worse.
On Thu, Jul 3, 2008 at 1:08 PM, Martin Maechler [EMAIL PROTECTED]
wrote:
TH == Tim Hesterberg [EMAIL PROTECTED]
on Tue, 1 Jul 2008 15:23:53 -0700 writes:
TH There is a bug in the standard version of [.data.frame;
TH it mixes up handling duplicates and NAs when
Below is a version of [.data.frame that is faster
for subscripting rows of large data frames; it avoids calling
duplicated(rows)
if there is no need to check for duplicate row names, when:
i is logical
attr(x, dup.row.names) is not NULL (S+ compatibility)
i is numeric and negative
]
if(decreasing){
ifelse1(strict,
any(x[-1] = x[-n]),
any(x[-1] x[-n]))
} else { # check for sort in increasing order
ifelse1(strict,
any(x[-1] = x[-n]),
any(x[-1] x[-n]))
}
}
On Tue, Jul 1, 2008 at 11:20 AM, Tim Hesterberg [EMAIL PROTECTED
]),
any(x[-1] x[-n]))
} else { # check for sort in increasing order
ifelse1(strict,
any(x[-1] = x[-n]),
any(x[-1] x[-n]))
}
}
On Tue, Jul 1, 2008 at 3:23 PM, Tim Hesterberg [EMAIL PROTECTED]
wrote:
There is a bug in the standard version of [.data.frame;
it mixes up
By whitespace, I mean either a space or tab (preceding the newline).
I'm using ESS:
ess-version's value is 5.3.6
GNU Emacs 21.4.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2007-08-28 on terranova, modified by Debian
I have the following in my .emacs:
(load ess-5.3.6/lisp/ess-site)
additional
methods defined for inheriting classes.
In cases like this you might prefer using an S3 class, using
attributes rather than slots for auxiliary information, so that
you don't need to write so many methods.
Tim Hesterberg
I am defining a new class. Shortly, I will submit a package
Tim Hesterberg wrote:
It depends on what the object is to be used for.
If you want users to be able to operate with the object as if it
were a normal vector, to do things like mean(x), cos(x), etc.
then the list would be very long indeed; for example, there are
225 methods for the S4
Hi Oleg,
If there as a class to inherit from, then my point about an S4 class
requiring lots of methods is moot. I think it would come down then to
whether one prefers flexibility (advantage S3) or a definite structure
for use with C/C++ (advantage S4).
Tim
well, I am not arguing that there
(prob) 1), the number of times the observation
is selected is the number of j's for which the inequalities hold.
* the selected observations are randomly sorted again.
Tim Hesterberg
Disclaimer - these are my opinions, not Insightful's.
__
R-devel@r
realized that in some cases we wanted to add a call attribute or
component/slot so that update() would work. If it had been an S3
object we could have done so, but as an S4 object we would have broken
existing objects of the class.
Tim Hesterberg
Disclaimer - this is my personal opinion, not my
for data frames and other classes.
The code below seems to presume a list, and would be very slow for vectors.
For reasons of consistency between S-PLUS and R, I would ask that an R
function be called anyMissing rather than hasNA or anyNA.
Tim Hesterberg
is there a hasNA() / an anyNA() function
. I spent a fair amount of time
trying to see if I could change it myself, but gave up.
Tim Hesterberg
Andy Liaw wrote:
If I'm not mistaken, this works as documented. As an example (typed
directly into the Rgui console on WinXP):
R f - function() {
+ browser()
+ cat(I'm here!\n)
+ cat
file.
So there is a workaround. But it is odd that the S files option
doesn't actually include what are probably the most common S files.
Thanks,
Tim Hesterberg
--please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = i386
os = mingw32
system
31 matches
Mail list logo