similar to: Improving efficiency in "outer"-like calculation

Displaying 20 results from an estimated 1000 matches similar to: "Improving efficiency in "outer"-like calculation"

2003 Oct 17
1
Modifying dim attribute of elements of a list
I am creating lists of vectors withing a loop. I also would like to change the dim attribute to the vectors in order to make them matrices. I have tried the following, but it doesn't work... > sim <- c('simMeans','simVars','simWeights') > indexTable <- table(modelIndex) > for (i in sim) { + assign(tmp <-
2004 Apr 14
2
attaching data.frame/list within a function
I'm trying to find a good way of attaching a list within a function such that the attached variables (the list's members) precede the global environment (.GlobalEnv) in the search list. Here is a non-working example using attach(), which hopefully explains better what I'm trying to do: > foo <- function(x=0, input=list(a=10)) { + attach(input) + on.exit(detach(input)) +
2005 Jan 04
2
x11 is not available
Dear list, I have problems installing R-2.0.1 on SUSE Linux 9.2. I used the following commands in order install R in /usr/local ./configure --with x11 --with-readline make make install When starting R and trying to display a plot on the X-window system output is written to a postscript file. When I try to run x11 with >x11() Error in X11(): X11 is not available. I do have a running
2007 Apr 24
1
Matrix: how to re-use the symbolic Cholesky factorization?
I have been playing around with sparse matrices in the Matrix package, in particularly with the Cholesky factorization of matrices of class dsCMatrix. And BTW, what a fantastic package. My problem is that I have to carry out repeated Cholesky factorization of a spares symmetric matrices, say Q_1, Q_2, ...,Q_n, where the Q's have the same non-zero pattern. I know in this case one does
2001 Dec 20
1
optimizing R-1.4.0 build on Solaris; a show-and-tell storry
This is a little success story about the benefits of changing the defaults in config.site when I was building R-1.4.0 for Solaris (on a Sun Sparc that I'm currently using). For previous versions of R, I had just used the default config.site and not given it any thought. Since the Sun machine that I'm using is not getting any faster, I decided I would give config.site a look when building
2002 Nov 27
1
problem with attr()
I got this wired behaviour of the attr() function using R-1.6.1 on both linux redhat 7.3 (i386) and Solaris 8 (Sparc): > tmp <- list(id=1) > > attr(tmp,"n.ch") <- 2 > attr(tmp,"n") <- 1 > tmp $id [1] 1 attr(,"n.ch") [1] 2 attr(,"n") [1] 1 > > attributes(tmp) $names [1] "id" $n.ch [1] 2 $n [1] 1 >
2011 Mar 10
1
Problems with upscmd ACCESS-DENIED
I'm trying to execute some commands on my ups, but I keep getting ERR ACCESS-DENIED upscmd -l sinus Instant commands supported on UPS [sinus]: beeper.toggle - Toggle the UPS beeper load.off - Turn off the load immediately load.on - Turn on the load immediately shutdown.return - Turn off the load and return when power is back shutdown.stayoff - Turn off the load and remain off shutdown.stop -
2002 Sep 10
9
R 1.6.0 beta
R 1.6.0 has gone into final feature freeze as of today. As a new feature, we'll make interim beta versions available via ftp://cran.us.r-project.org/pub/R/src/base alias http://cran.us.r-project.org/src/base (filename R-1.6.0beta_*.tar.gz, where * is the creation date). If you want to help ensure that the final 1.6.0 works satisfactorily on *your* platform, it might be a good idea to
2001 Nov 26
2
R not giving memory back to system?
This might be because I didn't get it right, but; I thought R would release memory back to the system as (big) objects get removed? Here is my platform (with 1Gb of RAM): platform sparc-sun-solaris2.8 arch sparc os solaris2.8 system sparc, solaris2.8 status major 1 minor 3.1 year 2001 month 08 day 31 language R A little example: Start a new section of R, with
2007 Apr 20
8
Suggestions for statistical computing course
Dear R-helpers, I am planning a course on Statistical Computing and Computational Statistics for the Fall semester, aimed at first year Masters students in Statistics. Among the topics that I would like to cover are linear algebra related to least squares calculations, optimization and root-finding, numerical integration, Monte Carlo methods (possibly including MCMC), bootstrap, smoothing and
2004 Sep 28
3
slow loops in Monte Carlo Simulations
Hi there, I am running Monte Carlo Simulations in R using ordinary "while (condition)" loops. Since the number of iterations is something like 100.000 and within each iteration a given subsample is extended sequentially it takes hours to run the simulation. Does anyone know if there is either a way to avoid using loops in Monte Carlo Simulations or how to include possible faster
2000 Jun 22
1
'pausing' in R
I have this 'odd' problem; I need to let R pause, for a given time, before starting next iteration in a loop. I'm using the following to do this task, but feel a little bit guilty because I'm using as much CPU time as I can get while pausing: while(keepGoing) { t.end <- proc.time()[3] + 5 ## the time this loop should end at [block of R commands] while(proc.time()[3]
2002 Sep 18
1
problem with make fullcheck on Sparc Solaris 8
I have been trying out R-1.6.0 tarballs (2002-9-10 and 2002-9-17) on: arch sparc os solaris2.8 system sparc, solaris2.8 status beta major 1 minor 6.0 year 2002 month 09 day 17 language R As you see form above, R-1.6.0 compiles fine and works. However, when I "make fullcheck" I get the following error: running code in 'tools-Ex.R' ... OK
2003 Aug 24
1
regression constraints (again)
Im trying to do regressions with constraints that the weights are all >=0 and sum(weights) = 1. I've read the archive and have set the problem up with solve.QP and just the non-negativity constraints along the lines of: y as the data vector X as the design matrix D <- t(X) %*% X d <- t(t(y) %*% X) A <- diag(ncol(X)) b <- rep(0,ncol(X)) fit <-
2011 Feb 25
1
Markov chain transition model, data replication project
Hello all, I am currently attempting to replicate data from a political science article that utilized a Markov chain transition model to predict voter turnout intention at time *t*; the data was separated into two different models based on whether prior intent was to vote or not to vote. The details don't really matter. Mostly I am curious how to run a Markov chain transition model in R,
2011 Mar 30
1
Information required for adding a ups to the compatibility list
Just wondering what information is required for adding a ups to the compatability list... Is upsc output enough? I've got a Inform Sinus SS 210 ( http://www.informups.com/sinus_1_phase_technics.html ) that seems to be working allright with the blazer_ser driver Here is the upsc output: battery.charge: 100 battery.runtime: 1379 battery.voltage: 41.40 battery.voltage.nominal: 36.0
2002 May 14
2
tapply and empty subsets
I am using tapply to compute means by group, as in > tapply(y, z, mean) 1 2 3 21.00757 20.50031 NA where y is a vector and z a factor with levels 1:3. I would like to get a zero instead of the NA I get when a subset is empty. The problem is that FUN is not applied to empty cells of the ragged array. (Of course I am willing to define a function my.mean that returns
2010 Aug 18
3
libreadline problem
Hello, Recently updated Ubuntu to 10.04, I have installed the r-base and r-base-dev packages from CRAN with sudo apt-get install r-base But now when I want to start R I get the following error: gpetris at definetti:~$ R /usr/lib/R/bin/exec/R: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC Any clue??? Has anybody seen that before? I have tried to reinstall the
2003 Oct 29
1
restarting split.screen
Is there a way of `restarting' split.screen? This is what I am getting: > close.screen() [1] 10 11 12 13 > close.screen(all=TRUE) Error in par(args) : parameter "i" in "mfg" is out of range > graphics.off() > x11() > close.screen() [1] 10 11 12 13 > close.screen(all=TRUE) Error in par(args) : parameter "i" in "mfg" is out of range As
2007 Jan 18
4
Reading contingency tables
I am trying to read an ftable using read.ftable, but I get the following error message: > jobSatTable <- read.ftable("http://definetti.uark.edu/~gpetris/stat5333/jobSatisfaction.dat",skip=2) Error in seek(file, where = 0) : no applicable method for "seek" In addition: Warning messages: 1: no non-missing arguments to max; returning -Inf 2: no non-missing arguments to