similar to: dump not evaluating promises?

Displaying 20 results from an estimated 2000 matches similar to: "dump not evaluating promises?"

1999 Mar 31
2
"dump" Splus -> R
Hi All, I just used "dump" on Splus to transfer a pile of survival objects from Splus 3.4 on Solaris 7 to R 0.63.3 on Intel. The only trick is that survival objects contain an element holding the original call that generated the object. When Splus writes these out, it doesn't mark them in any way, so when R tries to read them in, it ends up trying to reevaluate the call. Not
1999 Mar 31
2
"dump" Splus -> R
Hi All, I just used "dump" on Splus to transfer a pile of survival objects from Splus 3.4 on Solaris 7 to R 0.63.3 on Intel. The only trick is that survival objects contain an element holding the original call that generated the object. When Splus writes these out, it doesn't mark them in any way, so when R tries to read them in, it ends up trying to reevaluate the call. Not
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
2010 Nov 15
2
How to move an internal function to external keeping same environment?
Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as "external". This foo2 was using arguments within the foo1 environment that were not declared as inputs of foo2, which works as long as foo2 is within foo1, but not anymore if foo2 is external, as is the case now. Now, I could add all those
2011 Aug 01
4
Use dump or write? or what?
Greetings all, I am calculating two t-test values for each of many files then save it to file calculate another set and append, repeat. But I can't figure out how to write it to file and then append subsequent t-tests. (maybe too tired ;} ) I have tried to use "dump" and "file.append" to no avial. ttest_results = tempfile() two_sample_ttest <- t.test (tempA, tempB,
2006 Oct 11
1
dispatching on group generics with more than one formal
please see the code below. foo2 fails to dispatch correctly, but foo does fine. i have tried 'cacheMetaData(1)' and a number of different variants of 'cacheGenericsMetaData', on the possibility there is a caching issue. but i still can't sort it out. also one general question: does it really matter what's in the body of the function definition in a
2006 Jul 02
4
Test for argument in ...
Hello! Say I have a function foo1, which has argument ... to pass various arguments to foo2 i.e. foo1 <- function(x, ...) { foo2(x, ...) } Say that foo2 accepts argument arg1 and I would like to do the following: - if foo1 is called as foo1(x) then I would like to assign some value to arg1 inside foo1 before calling foo2 arg1 <- "some value" foo2(x, arg1=arg1) - if foo1 is
2006 Apr 11
2
About list to list - thanks
Thank you very much for your useful suggestions. These are exactly what I was looking for. foo <- list(foo1, foo2, foo3) lapply(foo, function(x) matrix(unlist(x), nrow = length(x), byrow = TRUE)) or lapply(foo, function(x) do.call('rbind', x)) Best, Muhammad Subianto On 4/11/06, Muhammad Subianto <msubianto at gmail.com> wrote: > Dear all, > I have a result my experiment
2012 Jul 27
1
C code validation
Dear R-devel, I'm trying to validate the results from a C function, against a (trial and tested) older R function. For reasons unknown to me, the C function seems to give different result sometimes at each trial, even with the very same data. These are the relevant outputs from R: > library(QCA) Loading required package: lpSolve > benchmark <- function(x, y) { + index <- 0
2007 May 28
1
where did the factor name go
> tmp <- data.frame(y=rnorm(12), a=factor(rep(letters[1:4],3))) > tmp y a 1 -0.60866099 a 2 0.55500538 b 3 0.12231693 c 4 -0.24613790 d 5 -0.09253593 a 6 -1.54652581 b 7 0.17204210 c 8 -1.22778942 d 9 1.22151194 a 10 -0.43982577 b 11 -1.25444287 c 12 -0.97251060 d > tmp.aov <- aov(y ~ a, data=tmp) > summary(tmp.aov) Df Sum Sq Mean Sq F value
2006 Apr 11
2
About list to list
Dear all, I have a result my experiment like this below (here my toy example): foo1 <- list() foo1[[1]] <- c(10, 20, 30) foo1[[2]] <- c(11, 21, 31) foo2 <- list() foo2[[1]] <- c(100, 200, 300) foo2[[2]] <- c(110, 210, 310) foo3 <- list() foo3[[1]] <- c(1000, 2000, 3000) foo3[[2]] <- c(1100, 2100, 3100) list(foo1,foo2,foo3) The result: > list(foo1,foo2,foo3) [[1]]
2018 Apr 05
1
potential file.copy() or documentation bug when copy.date = TRUE
This is a recent R-devel. file.copy() is not vectorized if multiple destinations succeed: cat("foo1\n", file = "foo1") cat("foo2\n", file = "foo2") unlink(c("copy1", "copy2"), recursive = TRUE) file.copy(c("foo1", "foo2"), c("copy1", "copy2"), copy.date = TRUE) #> Error in
2014 May 02
1
Authors@R: and Author field
Hi to all Authors@R: c(person("fooa","foob", role = c("aut","cre"), email = "fooa.foob@fooc.de"), person("foo1","foo2", role = c("ctb"), email = "foo1.foo2@foo3.de")) Author: fooa foob, with contributions from foo1 foo2 using r CMD check --as-cran .. (R 3.1
2002 Feb 20
1
plot.hclust: strange behaviour with "manufactured" hclust object
I've been trying to get plot.hclust to work with a hclust object I created and have not had much success. It seems that there is some "hidden" characteristic of a hclust object that I can't see. This is most easily seen in the following example, where plot.hclust works on one object, but when this object is "dumped" and then re-read, plot.hclust no longer works. Is
2012 May 29
1
Slow do.call when having an error
Hi, We've encountered a difference in running time between a straight function call and the same call using do.call when the called function generated an error. We've isolated the problem to the following small reproducible example: Consider the following function: foo <- function(nr = 2e6, nc=3, use.do.call = FALSE) { nn <- paste("V", 1:nc, sep="") z <-
2010 Mar 15
2
Strange behavior of assign in a S4 method.
Hi the list, I define a method that want to change an object without assignation (foo(x) and not x<-foo(x)) using deparse and assign. But when the argument of the method does not match *exactly* with the definition of the generic function, assign does not work... Anything wrong? Christophe #------ Does not work ------#
2010 Feb 10
1
How to solve: Error in * unused argument(s) ?
Hi all, For some reason, I would like to use functions bellow (see example code bellow), but instead I get the following error message: *Error in foo2(...) : unused argument(s) (arg3 = 3)* #--------------------- # example code #--------------------- foo1 <- function(arg1,...) { print(arg1) foo2(...) foo3(...) } foo2 <- function(arg2) { print(arg2) } foo3 <- function(arg3) {
2012 Jan 15
1
Calling Fortran from R: Issues with dynamic loading of fortran dll
I successfully used .Fortran to load and execute my fortran procedures under WinXP and 32 bit R. Alas, the same isn't true with my next Windows 7/64 machine, R 2.14.1 (64 bit) and the gnu gfortran (64) compiler (mingw64 v. 4.6.1). Though I'm able to compile the routines from the command line using gfortran '...', .Fortran('foo2') results in an error saying the Fortran
2008 Mar 25
1
Passing (Optional) Arguments
Dear List: In short, I am writing a number of functions as building blocks for other functions and have some questions about scoping and passing arguments. Suppose I have functions foo1, foo2, and foo3 such that: foo1<-function(a=1,b=TRUE,c=FALSE){#do stuff}; foo2<-function(x=1,y=FALSE,z=c(1,2,3,4)){#do stuff}; foo3<-function(lambda,...){lambda*foo1()*foo2()}; I want to be able to
2012 Oct 17
1
Do *not* pass '...' to NextMethod() - it'll do it for you; missing documentation, a bug or just me?
Hi, although I've done S3 dispatching for more than a decade now, I think I managed to overlook/avoid the following pitfall when using NextMethod(): If you explicitly pass argument '...' to NextMethod(), you will effectively pass those argument twice to the "next" method! EXAMPLE: foo0 <- function(...) UseMethod("foo0"); foo1 <- function(...)