search for: hofert

Displaying 20 results from an estimated 123 matches for "hofert".

Did you mean: hofer
2015 Feb 03
2
Seed in 'parallel' vignette
...u_n = z_n / (2^32-208) [as it is immediately clear then that one divides by the modulus of the first linear congruential generator + 1] 2) The case z_n=0 is not provided (for a reason?). If z_n=0, L'Ecuyer suggests to set u_n to "(2^32-209)/(2^32-208)". Cheers, Marius -- Marius Hofert, Dr. rer. nat. Assistant Professor Department of Statistics and Actuarial Science Faculty of Mathematics University of Waterloo 200 University Avenue West, Waterloo, ON, N2L 3G1 +1-519-888-4567, ext. 31394 (office M3 4207) http://math.uwaterloo.ca/~mhofert
2016 May 05
4
R process killed when allocating too large matrix (Mac OS X)
...d to tell her/him "Your dimension is quite large. Be aware of killers in your neighborhood"... before the killer attacks. Thanks & cheers, Marius On Wed, May 4, 2016 at 8:54 PM, Simon Urbanek <simon.urbanek at r-project.org> wrote: > > On May 4, 2016, at 6:14 PM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote: > >>> Can you elaborate on "leads to R being killed"? You should tell to the killer not to do it again :). >> >> Hi Simon! >> >> Sure, but who do you tell it if you don't know the killer? >> This is...
2011 Apr 06
7
Quiz: Who finds the nicest form of X_1^\prime?
Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expression(italic(X)[1]*minute)) Any suggestions? Cheers, Marius
2010 Dec 30
5
Why is format(10000, big.mark = "\\,") not 10\,000?
Hi, why does format(10000, big.mark = "\\,") not give me "10\,000"? How can I get this kind of "big.mark"? Cheers, Marius
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2016 May 05
1
R process killed when allocating too large matrix (Mac OS X)
...I don't like it but I give it to you anyway. I'll kill you quickly later". Why wouldn't the kernel just refuse to give that memory instead (i.e. malloc() returns NULL). Just curious... H. On 05/04/2016 06:21 PM, Simon Urbanek wrote: > > On May 4, 2016, at 9:00 PM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote: > >> Hi Simon, >> >> thanks for your quick reply. >> >> 1) ... so you can reproduce this? > > Yes, I can on 10.11.4. > > >> 2) Do you know a way how this can be 'foreseen'? We allocate larger &gt...
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts, I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example: A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix B <-
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts, how can I decrease the space between the tick marks and the corresponding labels in an splom? See here: library(lattice) U <- matrix(runif(4000), ncol = 8) splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large I checked ?panel.pairs but could not find an option for that. Cheers, Marius
2014 Aug 22
3
parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command
Hi, Both under the current R-devel (r66456) and a version from about 3 months ago, I experience the following behavior: > parallel::detectCores(TRUE) Error in system(cmd, TRUE) : error in running command > traceback() 3: system(cmd, TRUE) 2: gsub("^ +", "", system(cmd, TRUE)[1]) 1: parallel::detectCores(TRUE) > This is on Ubuntu 14.04. Does anybody else see this? [I
2015 Mar 08
0
Seed in 'parallel' vignette
On Tue, Feb 3, 2015 at 10:39 AM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote: > Hi, > > This is most likely only a minor technicality, but I saw the > following: On page 6 of the 'parallel' vignette > (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf), > the random-number generator &...
2016 May 05
0
R process killed when allocating too large matrix (Mac OS X)
On May 4, 2016, at 9:00 PM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote: > Hi Simon, > > thanks for your quick reply. > > 1) ... so you can reproduce this? Yes, I can on 10.11.4. > 2) Do you know a way how this can be 'foreseen'? We allocate larger > matrices in the copula package depending...
2020 Mar 27
2
Expressions from boxplot() passed to bxp()
Hi, Is this expected behavior (R-3.6.0)? dat <- cbind(x = 1:10, y = 10:1) ylab <- substitute(X[t], list(t = 2)) plot(dat, ylab = ylab) # works (correctly displays ylab) boxplot(dat, ylab = ylab) # fails boxplot(dat, ylab = as.expression(ylab)) # works Thanks & cheers, M
2015 Oct 21
2
rank(, ties.method="last")
Marius Hofert-4------------------------------ > Den 2015-10-09 kl. 12:14, skrev Martin Maechler: > I think so: the code above doesn't seem to do the right thing. Consider > the following example: > > > x <- c(1, 1, 2, 3) > > rank2(x, ties.method = "last") > [1] 1 2...
2019 Jun 24
1
Calculation of e^{z^2/2} for a normal deviate z
...rce file copula/R/special-func.R (in svn at R-forge : --> https://r-forge.r-project.org/scm/viewvc.php/pkg/copula/R/special-func.R?view=markup&root=copula ) {Yes, this GPL-2 licenced {with Copyright, see file, please keep this one line} ## Copyright (C) 2012 Marius Hofert, Ivan Kojadinovic, Martin Maechler, and Jun Y } ---------------------------------------------------------------------- ##' Properly compute log(x_1 + .. + x_n) for a given (n x d)-matrix of n row ##' vectors log(x_1),..,log(x_n) (each of dimension d) ##' Here, x_i > 0 for all i ##...
2012 Sep 15
2
How to convert the output of tapply() so that it has the same order as the input?
Hi, I try to apply a function to subsets of a data.frame. tapply() does the job, but the as output, I am looking for a vector (not an array/matrix) ordered in the same way as the original data, so I can simply cbind the result to the original data.frame. Below is a minimal example. I know that there are packages that can do these things easier, but I'm looking for a fast solution not
2010 Nov 26
3
lattice: strange behavior (?) when using trellis.device(color=FALSE)
Dear expeRts, I am not sure if I found a bug... I would like to create a function that itself creates a lattice plot without colors. Following http://www.mail-archive.com/r-help at r-project.org/msg64699.html I use trellis.device() to set the colors to FALSE. Whenever I call the minimal example below *with* trellis.device(), Quartz opens a window (I am working on a MAC), which it shouldn't,
2010 Nov 13
3
How to set an argument such that a function treats it as missing?
Dear expeRts, I would like to call a function f from a function g with or without an argument. I use missing() to check if the argument is given. If it is not given, can I set it to anything such that the following function call (to f) behaves as if the argument isn't given? It's probably best described by a minimal example (see below). The reason why I want to do this is, that I do
2006 Mar 04
5
Remove "gray grid" from levelplot
Hi, If I use the levelplot function of the lattice library, I always see small "squares" in the plot. They indicate the region for which the same color is used. If you have a levelplot of a function which is evaluated at 25x25 equally-spaced points you obtain 26 squares in x and 26 squares in y direction. That does not bother too much (but still bothers somehow...), but if you
2013 Mar 11
2
How to 'extend' a data.frame based on given variable combinations ?
Dear expeRts, I have a data.frame with certain covariate combinations ('group' and 'year') and corresponding values: set.seed(1) x <- data.frame(group = c(rep("A", 4), rep("B", 3)), year = c(2001, 2003, 2004, 2005, 2003, 2004, 2005), value = rexp(7)) My goal is essentially to
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
Dear expeRts, I would like to create a scatter plot matrix with splom(). The lower panel should contain some additional information about the samples shown in the upper panel plot, see the splom() call below. Now two questions came up: (1) The lower panels show "tau" and "alpha" on top of each other. How can I plot *three* expressions on top of each other? I tried several