search for: 10e3

Displaying 8 results from an estimated 8 matches for "10e3".

Did you mean: 1093
2011 Jul 05
0
Prettier axis labels when using log (or exp!!) scales in Lattice (follow up)
...attice: Multivariate Data Visualization with R at chapter 8. Unfortunately all the examples refers to log transformation of data, but actually what I'm looking for is exactly the reverse (exp). An example would better show what I'm looking for. library(latticeExtra) xyplot(Sepal.Length*10e3 ~ Sepal.Width, iris) If the figures are higher, the format of the labels also changes xyplot(Sepal.Length*10e12 ~ Sepal.Width, iris) The y axis of the above plot is what I'm currently get with my data I would like the y axis in the form 50^3 . I would better say I want the y axis labels in t...
2013 May 25
2
Assigning NULL to large variables is much faster than rm() - any reason why I should still use rm()?
...ory footprint small, I can equally well reassign the variable the value of a small object (e.g. a <- NULL), which is significantly faster than using rm(). SOME BENCHMARKS: A toy example imitating an iterative algorithm with "large" temporary objects. x <- matrix(rnorm(100e6), ncol=10e3) t1 <- system.time(for (k in 1:ncol(x)) { a <- x[,k] colSum <- sum(a) rm(a) # Not needed anymore b <- x[k,] rowSum <- sum(b) rm(b) # Not needed anymore }) t2 <- system.time(for (k in 1:ncol(x)) { a <- x[,k] colSum <- sum(a) rm(list="a") # Not ne...
2018 Aug 13
2
substitute() on arguments in ellipsis ("dot dot dot")?
Interestingly, as.list(substitute(...())) also works. On Sun, Aug 12, 2018 at 1:16 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 12/08/2018 4:00 PM, Henrik Bengtsson wrote: >> >> Hi. For any number of *known* arguments, we can do: >> >> one <- function(a) list(a = substitute(a)) >> two <- function(a, b) list(a = substitute(a), b =
2018 Aug 13
1
substitute() on arguments in ellipsis ("dot dot dot")?
...LSE)[["..."]] > > stats <- microbenchmark::microbenchmark( > dots1(1+2, "a", rnorm(3), stop("bang!")), > dots2(1+2, "a", rnorm(3), stop("bang!")), > dots3(1+2, "a", rnorm(3), stop("bang!")), > times = 10e3 > ) > print(stats) > # Unit: microseconds > # expr min lq mean median > uq max neval > # dots1(1 + 2, "a", rnorm(3), stop("bang!")) 2.14 2.45 3.04 2.58 > 2.73 1110 10000 > # dots2(1 + 2, "a", rnorm(...
2018 Aug 13
0
substitute() on arguments in ellipsis ("dot dot dot")?
...) match.call(expand.dots = FALSE)[["..."]] stats <- microbenchmark::microbenchmark( dots1(1+2, "a", rnorm(3), stop("bang!")), dots2(1+2, "a", rnorm(3), stop("bang!")), dots3(1+2, "a", rnorm(3), stop("bang!")), times = 10e3 ) print(stats) # Unit: microseconds # expr min lq mean median uq max neval # dots1(1 + 2, "a", rnorm(3), stop("bang!")) 2.14 2.45 3.04 2.58 2.73 1110 10000 # dots2(1 + 2, "a", rnorm(3), stop("bang!")) 1.81 2.10 2...
2014 Nov 24
1
Error "promise already under evaluation ..." with function(x, dim=dim(x))
...t("dim", envir=getNamespace("base"), inherits=FALSE, mode="function") + } + dim(x) + } + }) > stats <- microbenchmark( + dim(x), + base::dim(x), + dim_R(x), + dim_R_memoized(x), + dim_illegal(x), + sum(x), + unit="ns", + times=10e3 + ) Warning message: In microbenchmark(dim(x), base::dim(x), dim_R(x), dim_R_memoized(x), : Could not measure a positive execution time for 3859 evaluations. > print(stats) Unit: nanoseconds expr min lq mean median uq max neval cld dim(x) 0 0...
2011 Aug 03
4
slow computation of functions over large datasets
Hello there, I’m computing the total value of an order from the price of the order items using a “for” loop and the “ifelse” function. I do this on a large dataframe (close to 1m lines). The computation of this function is painfully slow: in 1min only about 90 rows are calculated. The computation time taken for a given number of rows increases with the size of the dataset, see the example with
2003 Apr 28
1
Wine compile error in tools/wpp (ppl.l) under debian
I'm getting a compile error when trying to compile the flex output of ppl.l in tools/wpp. This is under Debian (Woody) with latest updates. Can anybody help me out? Enclosed is the output of the build and folling that, the installed packages. I have also tried the latest version (20030408) with identical results. TIA Luke ================================================================