similar to: repeat takes along time

Displaying 20 results from an estimated 1600 matches similar to: "repeat takes along time"

2012 Apr 25
1
Using apply() with a function involving ode()
Hello, I am trying to get the output from the numerical simulation of a system of ordinary differential equations for a range of values for three parameters. I am using the ode() function (deSolve package) to run the numerical simulation and apply() to run the simulation function for each set of parameter values. I am having trouble getting the apply() function to work. Here is an
2012 Sep 02
1
glmulti runs indefinitely when using genetic algorithm with lme4
Dear List, I'm using glmulti for model averaging in R. There are ~10 variables in my model, making exhaustive screening impractical - I therefore need to use the genetic algorithm (GA) (call: method = "g"). I need to include random effects so I'm using glmulti as a wrapper for lme4. Methods for doing this are available here
2008 Dec 22
0
Align legend title
Dear R developers, I needed to align the title of legend for some of my plots. If there is interest to include this into base R, bellow are the examples and the relevent diffs. Regards, Gregor x <- 1:10 y1 <- 1.5 * x y2 <- 2.0 * x y <- cbind(y1, y2) source(file=url("http://gregor.gorjanc.googlepages.com/legend.R")) matplot(x, y, type="l", lty=c(1, 2)) ##
2011 Nov 30
0
formula for calculating the survival probability for nomogram
Hi, I used Dr. Harrell's rms package to make a nomogram. Below is my code for nomogram and calculate total points and probability *in original data set* used for building the nomogram. *My question is how I get the formula for calculating the survival probability for this nomogram. Then I can use this formula to do validation by using other data set. * f1 <- cph(Surv(retime,dfs) ~
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),
2010 Jul 29
1
[PATCH] Reflow logic to make it easier to follow
The control flow was: if (!y) { ppix = ... } if (y) { ... } else if (x) { use ppix for something } else { use ppix for something } Merge the if(!y) block with the two else branches. This avoids a false-positive in the clang static analyzer, it can't know that !y and x are mutually exclusive. The result looks something like this: if (y) { ... } else { ppix = ... if (x) {
2011 May 19
3
problem with optim()
Dear R-users, I would like to maximize the function g above which depends on 4 parameters (2 vectors, 1 real number, and 1 matrix) using optim() and BFGS method. Here is my code: # fonction to maximize g=function(x) { x1 = x[1:ncol(X)] x2 = x[(ncol(X)+1)] x3 = matrix(x[(ncol(X)+2):(ncol(X)+1+ncol(X)*ncol(Y))],nrow=ncol(X),ncol=ncol(Y)) x4 = x[(ncol(X)+1+ncol(X)*ncol(Y)+1):length(x)]
2001 Jul 23
2
hang-up with log="x" and segments (PR#1030)
I experienced the following problem with R 1.3.0 which is probably a bug. The program hangs-up if 1.) a coordinate of segments is outside the ploting region and 2.) the option log="x" is used. ## ## works fine ## plot(1,1, xlim=c(0.5, 2), ylim=c(0.5, 2)) segments(0.5 , 1.2, 1, 0.6) segments(0.25, 1.2, 1, 0.6) segments(1 , 1.2, 1, 0.6) ## ## hang-up ## plot(1,1, xlim=c(0.5, 2),
2006 Aug 12
5
In place editing on a list - not passing ID through
I want to do in-place edits on a list of data, but I''m having trouble getting the ID passed through to the controller. I use this in my view to create the field: <% for frame in @frames %> ... <%= in_place_editor_field :frame, :price %> <% end %> and this produces the following in my output: <span class="in_place_editor_field"
2009 Aug 23
2
difficult "for"
Hi, My english isn't brilliant and my problem is very difficult to describe but I try ;) My first question is: May I write loop "for" like this or similar - for (i in sth : sth[length(sth)], k in sth_else : length(sth_else) ) - I'd like to have two independent conditions in the same loop "for". My secound question depend on program below. I'd like to write every
2006 Jan 04
2
Using 'polygon' in a 3d plot
I'm new to R, after many years of using Matlab. I've found the R function 'polygon' to be nearly equivalent to the Matlab function 'patch'. For example, the R commands: plot(c(0, 5), c(0, 4), type = 'n', asp = 1, ann = FALSE) x <- c(1, 2, 2, 1.5, 1) z <- c(1, 1, 2, 1.7, 2) polygon(x, z, col = 'green') produce a plot with a small green shape exactly
2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion I think my problem may also only occur when the left hand side of the formula is cbind(...) Here is example code that generates a dataset and then the error. The first function "agg2" fails > agg2(FALSE) do agg 2 Error in m[[2L]][[2L]] : object
2010 Nov 17
1
rasterImage and coordinate conversion
Hi, I have a plot and I would like to overlay a PNG image over it. I'm using the rasterImage function to do this, but the problem I'm facing is working out the coordinates of the upper right corner of the final image in user coordinates. That is I can place the image so the lower left is located at the bottom of the y-axis and the left end of the x-axis. Since my image is say 100px x
2007 Apr 18
1
Conditional power, predictive power
is there no package/function in R to calculate the conditional power or the bayesian predictive power for trials with binary endpoints? Thanks -- View this message in context: http://www.nabble.com/Conditional-power%2C-predictive-power-tf3603396.html#a10066991 Sent from the R help mailing list archive at Nabble.com.
2017 Oct 08
2
Discourage the weights= option of lm with summarized data
Indeed: Using 'weights' is not meant to indicate that the same observation is repeated 'n' times. As I showed, this gives erroneous results. Hence I suggested that it is discouraged rather than encouraged in the Details section of lm in the Reference manual. Arie ---Original Message----- On Sat, 7 Oct 2017, wolfgang.viechtbauer at maastrichtuniversity.nl wrote: Using
2009 May 29
1
probably simple paste question
Dear R People: I have the following vector and am using the paste command: > ya [1] 57 2 8 > paste("stuff",ya,sep=" ") [1] "stuff 57" "stuff 2" "stuff 8" What I want to have is "stuff 57 2 8" I also tried: > yb <- paste(cat("stuff",ya)) stuff 57 2 8> yb character(0) I have the feeling that it's really
2017 Oct 07
1
Discourage the weights= option of lm with summarized data
In the Details section of lm (linear models) in the Reference manual, it is suggested to use the weights= option for summarized data. This must be discouraged rather than encouraged. The motivation for this is as follows. With summarized data the standard errors get smaller with increasing numbers of observations. However, the standard errors in lm do not get smaller when for instance all weights
2017 May 31
4
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Seriously, if a method gives a wrong result, it's wrong. line() does NOT implement the algorithm of Tukey, even not after the patch. We're not discussing Excel here, are we? The method of Tukey is rather clear, and it is NOT using the default quantile definition from the quantile function. Actually, it doesn't even use quantiles to define the groups. It just says that the groups
2013 Aug 23
1
yum update after update from 6.3 to 6.4 - problems with epel repository.
Hi All. I've updated my system from 6.3 to 6.4. In my /etc/yum.repos.depel.repo I have: [epel] name=Extra Packages for Enterprise Linux - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch mirrorlist= http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch failovermethod=priority gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
2011 Jun 30
1
Error "singular gradient matrix at initial parameter estimates" in nls
Greetings, I am struggling a bit with a non-linear regression. The problem is described below with the known values r and D inidcated. I tried to alter the start values but get always following error message: Error in nlsModel(formula, mf, start, wts): singular gradient matrix at initial parameter estimates Calls: nls -> switch -> nlsModel I might be missing something with regard to the