similar to: new("call") problem

Displaying 20 results from an estimated 7000 matches similar to: "new("call") problem"

2005 Jan 12
2
?"=" (Windows) (PR#7504)
?"=", ?"==", ?"!=", ?">=", and ?"<=" sends me to the documentation for ?help on Windows, while returning the correct documentation on Linux. Robert > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor
2010 Jul 06
1
with(x, Recall()) Crash
R-devel, I discovered a segfault in my R code that boiled down to my incorrect use of the Recall() function embedded within a with() function. Since segfaults are generally bad things, even when it's the user's fault for writing nonsense code, I thought I'd pass along the offending code. I've tested the crash on R 2.11.1 (on Linux and Mac), but not in devel versions of R. HTH,
2005 Jan 07
1
Creating unary operators
Is it correct (by its lack of mention in the R-Language Definition Manual) that it is impossible to create a user-defined unary operator? Ex: (This doesn't work, but it's an example of what I'm looking for) > "%PLUSONE%" <- function(x) x + 1 > %PLUSONE% 2 [1] 3 And if the above is impossible, am I limited to only the + - ~ ! unary operators for overloading? On
2005 Jan 10
1
new("call") problem (PR#7490)
I have found a solution to the new("call") problem that I believe produces the correct behavior for the default call object, and am also reclassifying this as a bug, as I believe the current behavior to be incorrect. Recap, the following error occurs: > new("call") Error in print("<undef>"()) : couldn't find function "<undef>" It looks
2004 Dec 09
1
Modulus Bug (PR#7409)
R Developers, 1000000000000000000 %% 11 [1] -32 I now understand that integers cannot be larger than .Machine$integer.max, but because the above produces a result than is patently wrong instead of an error, I'm reporting this as a bug. Thank you for the incredible contributions all of you have made in developing the R platform. Best, Robert Robert McGehee Geode Capital Management, LLC 53
2006 May 09
0
Typo in getAllMethods() (PR#8848)
The function getAllMethods in the methods package uses the non-existent function packageName where I believe the function getPackageName was intended. For example: > getAllMethods("formula") Error in sprintf(gettext(fmt, domain = domain), ...) : could not find function "packageName" The patch to RMethodUtils.R is here: 238c238 <
2005 Jan 05
2
Rcmd check Error help
R-help, I'm the primary developer for an increasingly large R package with over three thousand lines of code. Unfortunately, do the complexity of the code, I sometimes am required to change several interoperating parts of the package before testing for bugs and performance. And sometimes unnoticed syntax errors slip in that cause Rcmd check / INSTALL to fail with such messages as: Error in
2005 Jan 12
0
Function Body / Formals Bug (PR#7495)
I'd like to report two bugs in the R function definitions, the first slightly problematic, the second likely unimportant. Both of these are reproducible on both Windows and Linux, R 2.0.1 First Bug: > a <- new("function") > formals(a) <- alist(a=, b=, c=, d=) > a function (a, b, c) ## the d argument disappeared! > formals(a) <- alist(a=, b=, c=, d=) > a
2010 Jun 23
1
NAs and weighted.mean
R-developers, In version R 2.11.0, weighted.mean was changed such that: > weighted.mean(NA, na.rm=TRUE) [1] 0 rather than NaN as in previous versions of R. I see a note in the NEWS file indicates that weighted.mean was changed "so an infinite value with zero weight does not force an NaN result." In case the side effect of returning 0 rather than NaN in this case was unintentional,
2010 Jun 29
2
POSIXlt matching bug
I came across the below mis-feature/bug using match with POSIXlt objects (from strptime) in R 2.11.1 (though this appears to be an old issue). > x <- as.POSIXlt(Sys.Date()) > table <- as.POSIXlt(Sys.Date()+0:5) > length(x) [1] 1 > x %in% table # I expect TRUE [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE > match(x, table) # I expect 1 [1] NA NA NA NA NA NA NA NA
2005 Jan 08
1
sub( , perl = TRUE) overflow (PR#7479)
I'd like to report a bug (buffer overflow?) in the function sub(..., perl = TRUE) I wanted to implement the familiar perl function for removing white spaces before and after a character string: sub trimwhitespace($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; } So in R this would (presumably) become: trimwhitespace <- function(x) { x <-
2006 Nov 29
1
Removing terms from formula
R-help, Given a simple linear model, say lm(x ~ y + z), I would like to remove model terms that are factors with only one level. Thus, if 'z' were a factor with only one level, lm(x ~ y + z) becomes lm(x ~ y + 1). Likewise, if both 'y' and 'z' are one-level factors, then the resulting calculation is simply lm(x ~ 1). Unfortunately, I have not been able to come up with an
2005 Jan 24
6
Very Long Expressions
Greetings, I'm having some difficulties with evaluating very long expressions (Windows/Linux 2.0.1), as seen below, and would greatly appreciate any help, thoughts or work arounds. Let's say that I wanted to see what I would get if I added 1 to itself 498 times. One way of doing this would be to evaluate the expression 1+1+1+... > eval(parse(text = paste(rep(1, 498), collapse =
2008 Jul 08
1
split.Date
Hello, I wanted to suggest that the below method for split.Date be added to the base library to significantly speed up splits with values of class Date. In the below example I show a speed improvement of 175x for 1000 data points. On a vector of size 1e6, the time difference was 22 minutes for split.default versus 0.3 seconds for the split.Date function below (!). Note that this improvement will
2008 Sep 12
1
match and incomparables
Hello, I was playing around with the newly implemented 'incomparables' argument in 'match' and realized the argument does not behave anything like I expected. Can someone explain what is going on here? Sorry if I'm misreading the documentation. > match(1:3, 1:3, incomparables=1) [1] NA 2 3 # This seems right, the 1 in 'x' is 'incomparable' >
2006 Sep 29
1
Plotting text with lattice
Hello, I've decided to take the leap and try my hand at the lattice package, though I am getting stuck at what one might consider a trivial problem, plotting text at a point in a graph. Apologies in advance if (that) I'm missing something extremely basic. Consider in base graphics: > plot(1:10) > text(2, 4, "Text") In the above you will see text centered at the point (2,
2008 May 16
1
var/sd and NAs in R2.7.0
Hello all, I just upgraded to R 2.7.0 and found that the behavior of 'var' and 'sd' have changed in the presence NAs (this wasn't explicit in the NEWS file, though I see it probably has to do with the change for cor/cov). Anyway, I just want to make sure that it was intentional to produce an error when there was all NAs and na.rm=TRUE, rather than returning an NA (like R
2006 Jan 12
1
.leap.seconds
I glanced at the .leap.seconds object and noticed that it has not been updated for the most recent leap second that occurred 2005 December 31, 23h 59m 60s. See the IERS bulletin here: http://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat Moreover, after a more careful glance at the .leap.seconds object, I noticed that there are two incorrect entries. First, there was not a leap second on 1986 June
2008 Apr 28
2
time zone conversion
Hello, I'm trying to convert times in the EST/EDT (New York) format to times in the GMT/BST (London) and UTC+9 format (Tokyo). That is, if I know what time it is in New York, what is local time in London and Tokyo? Ex: Here's the conversion from New York EST/EDT time to London's GMT/BST time zone for three days in 2007. Note that the US and London change to daylight savings on
2006 Sep 20
1
seq.Date not accepting NULL length.out (PR#9239)
There seems to be a bug in seq.Date such that it will not allow the user to pass in length.out =3D NULL, despite the fact that this is the = default argument. For example: > dt1 <- as.Date("2004-12-31") > dt2 <- as.Date("2005-12-31") > seq.Date(dt1, dt2, length.out =3D NULL, by =3D "month") Error in seq.Date(dt1, dt2, length.out =3D NULL, by =3D