similar to: hash code for arbitrary object

Displaying 20 results from an estimated 20000 matches similar to: "hash code for arbitrary object"

2005 Jan 27
7
getting package version inside .First.lib
Greetings - Is it possible, inside .First.lib, to find out the version number of the package that is being loaded? If only one version of the package has been installed, we could scan the DESCRIPTION file, something like .First.lib <- function(lib, pkg) { library.dynam("spatstat", pkg, lib) dfile <- system.file("DESCRIPTION", package="spatstat")
2003 Jun 16
2
extension to plot.formula?
Could I suggest the following extension to plot.formula: plot(cbind(y1,y2) ~ x, ...) should plot (y1 against x) and (y2 against x) on the same plot. The default y axis limits would be determined by the range of c(y1,y2). This would be pretty handy sometimes, replacing 4 lines of code. The current plot.formula evaluates cbind(y1,y2), which is a matrix, so plot.formula looks for
2004 Dec 03
4
factor matrix
Sorry if this is a FAQ. Is there a good reason why a factor has to be a one-dimensional vector and cannot be a matrix? I want to construct matrices of categorical values. Vain attempts like matrix(factor(c(T,F,F,T), 2,2) yield a matrix of character strings representing the factor levels, not the levels themselves, while factor(matrix(c(T,F,F,T), 2,2)) converts the matrix to a
2005 Jun 03
2
dot in formula
gReetings, I want to manipulate a formula object, containing the name "." so that "." is replaced by a desired (arbitrary) expression. What is a safe way to do this? Adrian Baddeley
2003 Aug 06
1
contour lines intersect
Hi, Sorry if this is already known... contour() sometimes draws contour lines that intersect. Is there a temporary fix? A dataset which causes problems is at http://www.maths.uwa.edu.au/~adrian/dumpdata.R If you try just source("dumpdata.R") image(huh) contour(huh) the 100 x 100 matrix 'huh' contains an hourglass-shaped region of values around 0.8. The contour plot
2009 Dec 17
2
segfault in glm.fit (PR#14154)
Bug summary: glm() causes a segfault if the argument 'data' is a data frame with more than 16384 rows. Bug demonstration: -------input --------------- N <- 16400 df <- data.frame(x=runif(N, min=1,max=2),y=rpois(N, 2)) glm(y ~ x, family=poisson, data=df) ------ output --------------- *** caught segfault *** address (nil),
2013 Sep 19
1
Vignette problem and CRAN policies
Hello, All: The vignette with the sos package used "upquote.sty", required for R Journal when it was published in 2009. Current CRAN policy disallows "upquote.sty", and I've so far not found a way to pass "R CMD check" with sos without upquote.sty. I changed sos.Rnw per an email exchange with Prof. Ripley without solving the problem; see below. The
2005 Feb 07
2
Environment of a formula
Wise and merciful R-helpers: I want to equip a data frame with an attribute which specifies how to plot some of the columns. Up to now we have been doing this by giving the data frame a `formula' attribute, that can be passed to plot.formula. For example dat <- data.frame(x=1:100,y=runif(100),z=100:1) attr(dat, "plotme") <- (z ~ x) ...... ......
2014 Jul 30
2
listof
Dear R developers A question about the class 'listof', defined in package 'stats'. Other than its definition and use in the code for 'anova', we can't see that the class 'listof' is used for anything else (in recommended packages, or elsewhere). In the spatstat package we have been using a 'listof' to represent a list of spatial objects of the same
2007 Aug 22
1
C code generators
Dear R-helpers Are there any established R packages that include a C code generator -- that generates new C language files and compiles them? To be precise what I'm looking for is a process that takes text input in some format (it might be pseudocode, fragments of C code, etc) and creates a valid C language source file that can be compiled by R CMD COMPILE. Ideally the procedure should also
2001 Aug 01
1
glm() with non-integer responses
A question about the inner workings of glm() and dpois(): Suppose I call glm(y ~ x, family=poisson, weights = w) where y contains NON-INTEGER (but still nonnegative) values. (a) Does glm() still correctly maximise the weighted Poisson loglikelihood ? (i.e. the function given by the same formal expression as the weighted loglikelihood of independent Poisson variables Y_i except that the
2005 Dec 09
1
O-ring statistic
Rainer M Krug writes: > Thorsten Wiegand used in his paper Wiegand T., and K. A. Moloney 2004. > Rings, circles and null-models for point pattern analysis in ecology. > Oikos 104: 209-229 a statistic he called O-Ring statistic which is > similar to Ripley's K, only that it uses rings instead of circles. > > http://www.oesa.ufz.de/towi/towi_programita.html#ring
2007 Mar 26
2
sampling from the uniform distribution over a convex hull
Ranjan Maitra writes: > Does anyone have a suggestion (or better still) code for sampling > from the uniform distribution over the convex hull of a set of > points? This is implemented in library 'spatstat'. If x and y are vectors of coordinates of your initial set of points, library(spatstat) W <- convexhull.xy(x, y) P <- runifpoint(42, W) will compute
2004 Jun 11
3
Change in grep behavior from 1.9.0 to R-patched
I've noticed a change in the way grep() behaves between the 1.9.0 release and a recent R-patched. On 1.9.0 I get the following output: > x <- dget(file = url("http://www.biostat.jhsph.edu/~rpeng/names.R")) > length(grep("^l\\w+tmean", x, perl = TRUE, value = TRUE)) [1] 84 And on R-patched (2004-06-11) I get > x <- dget(file =
2007 Oct 15
2
Digest package - make digest generic?
On 10/15/07, Henrik Bengtsson <hb at maths.lth.se> wrote: > [As agreed, CC:ing r-devel since others might be interested in this as well.] > > Hi. > > On 10/15/07, Dirk Eddelbuettel <edd at debian.org> wrote: > > > > Hi Hadley, > > > > On 15 October 2007 at 09:51, hadley wickham wrote: > > | Would you consider making digest a generic
2008 Mar 18
4
cut.Date and cut.POSIXt problem
cut.Date and cut.POSIXt indicate that the breaks argument can be an integer followed by a space followed by "year", etc. but it seems the integer is ignored. For example, I assume that breaks = "3 months" is supposed to cut it into quarters but, in fact, it cuts it into months as if 3 had not been there. > d <- seq(Sys.Date(), length = 12, by = "month") >
2008 Jul 31
2
C versions of serialize/unserialize in packages
Are the functions 'R_Unserialize' and 'R_InitFileInPStream' allowed to be used in R packages? I guess I'm just not clear on the implications of this comment in 'Rinternals.h': /* The connection interface is not yet available to packages. To allow limited use of connection pointers this defines the opaque pointer type. */ I have a function in the
2001 Aug 10
1
bug in dummy.coef.lm? (PR#1048)
Hi - I'm running R 1.3.0 on i686-pc-linux-gnu > rm(x, y, z) > df <- data.frame(x=1:20,y=1:20,z=factor(1:20 <= 10)) dummy.coef falls over: > dummy.coef.lm(lm(y ~ z * poly(x,1), data=df)) Error in poly(x, 1): Object "x" not found > dummy.coef.lm(lm(y ~ z * I(x), data=df)) Error in unique(c("AsIs", class(x))): Object "x" not found but
2012 Mar 28
3
Spatstat users.
This is a cry for help. My apologies for taking up bandwidth with an issue that is not really on topic. But I really do want to acquire the requested information. In the course of preparing my PBRF (performance based research funds) portfolio for the upcoming PBRF exercise here in New Zealand, I have been advised that I should provide some estimate of the number of "active users" of
2002 Jul 10
1
PS to incorrect URL (PR#1766)
Hi - the list of mirror sites given at www.r-project.org/ also mentions http://mirror.au.r-project.org/pub/CRAN The correct URL seems to be http://cran.planetmirror.com/ regards Adrian Baddeley -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",