search for: tempx

Displaying 10 results from an estimated 10 matches for "tempx".

Did you mean: temp
2008 Oct 31
0
R help for invoking nmmin()
My code is as follows: #include <iostream> #include <cmath> using namespace std; #define MATHLIB_STANDALONE 1 extern "C" { #include "R_ext/Applic.h" } typedef struct TT{ double ** tempX; double * tempY; int tempN; } TT, *MM; double fn(int N, double * beta, void * ex){ double total = 0; int i = 0,j = 0; double * betaFn = new double[N]; MM tmp = (MM)ex; for(i = 0; i < N; i++) { betaFn[i] = exp(beta[i]); } for(j = 0; j < tmp->tempN; j++) { double temp = 0; f...
2005 Feb 14
1
how can i make my program faster
...each time when i want to add data into my data, i have to copy data of table into an array for each column, and then i add new data into my array, then i copy my array into the table one column by one column. For example temptrial <- table1$trial; temptrial <- c(temptrial, "1, 2"); tempx <- table1$x; tempx <- c(tempx, "1, 2"); tempy <- table1$y; tempy <- c(tempy, "1, 2"); table1 <- data.frame(trial = temptrial, x = tempx, y = tempy); the way i am doing makes my program very slow, because i need to copy the data from one variable to another v...
2011 Dec 14
1
series temporales. índices de variación estacional
...momento estoy viendo cosas muy simples, como descomponer una serie en tendencia y componente estacional, usando la función decompose y también la función stl. Por ejemplo # generamos 48 datos de una normal por ejemplo x <- rnorm(48) # creamos el objeto ts diciendo que los datos son mensuales tempx <- ts(x,start=c(2008,1),frequency=12) descomposicion1 <- decompose(tempx, type="mult") # también se puede usar la función stl, descomposicion2 <- stl(tx,s.window="periodic") ¿Puedo obtener los índices de variación estacional a partir de los valores guardados en descom...
2015 Jun 11
0
Odd behavior of plot function
Sorry, that's a cut and paste error. It should be either tempx or xtemp throughout. Terry T On 06/11/2015 12:59 PM, John Nolan wrote: > Is there a misprint in your example? The first line of code uses tempx, but the rest uses a different variable xtemp? > > John > > -----"R-devel" <r-devel-bounces at r-project.org> wrote: -----...
2002 Jan 25
0
rpart subsets
...unction rpart in rpart.s is: if (method.int ==3 ) { numclass <- init$numresp -1 temp <- rp$dnode[,-(1:4)] %*% diag(init$parms$prior* sum(init$counts)/init$counts) # Bob's clumsy attempt to remove the NaN's that result when # calculating the probabilities tempx <- matrix(0, nrow=nrow(temp), ncol=ncol(temp)) tempx[which(is.finite(temp))] <- temp[which(is.finite(temp))] temp <- tempx # end of Bob's changes yprob <- temp /apply(temp,1,sum) #necessary with altered priors yval2 <- matrix(rp$dnode[, -(1:3)], ncol=numclas...
2002 Jan 28
0
rpart subset fix
...unction rpart in rpart.s is: if (method.int ==3 ) { numclass <- init$numresp -1 temp <- rp$dnode[,-(1:4)] %*% diag(init$parms$prior* sum(init$counts)/init$counts) # Bob's clumsy attempt to remove the NaN's that result when # calculating the probabilities tempx <- matrix(0, nrow=nrow(temp), ncol=ncol(temp)) tempx[which(is.finite(temp))] <- temp[which(is.finite(temp))] temp <- tempx # end of Bob's changes yprob <- temp /apply(temp,1,sum) #necessary with altered priors yval2 <- matrix(rp$dnode[, -(1:3)], ncol=numclas...
2009 Nov 06
1
Survival Plot in R 2.10.0
...(time, status) ~ x, data = aml) > plot(leukemia.surv, lty = 2:3) ## works fine > plot(leukemia.surv, lty = 2:3, fun="cloglog") ## works fine > plot(leukemia.surv, type="p") ## generates error below: Error in plot.default(tempx, tempy * yscale, type = "n", log = logax, : formal argument "type" matched by multiple actual arguments > search() [1] ".GlobalEnv" "package:survival" "package:splines" [4] "package:stats" "package:graphics"...
2001 Feb 28
1
Spider diagrams
Hi, I am trying to create what are called "spider diagrams" in the geochemical literature using R. A spider diagram is basically a plot of the atomic number versus the concentration on a log scale. Lines are drawn from each atomic number for each sample. Right now, my data frame looks like: SAMPLE SITE V3 LA.NASC LAATNUM CE.NASC CEATMNUM 1 1A:001
2015 Jun 11
0
Odd behavior of plot function
The following code snippet taken from plot.survfit now gives me a surprising result: tempx <- c(0, 400, 0, 0) ytemp <- c(.0657, .98, 1, 0) plot(range(xtemp), range(ytemp), log='y', type='n') In that the max value for the x axis is now 10. The 0 on the end of ytemp was actually a mistake and shouldn't be there, if you remove it then the upper limit is sensible...
2002 May 02
2
plot survival points
Hi all, I have a little problem. I make an weibull survival analysis using the survival package. It,s OK, them I have the functions. I plot this funcions with curve(). I want to make a plot with the real survival points (proportion of alive x time) and them add the curves to points. I have the time to dead, the censor data and my trataments. To analysis the model is: model1 <-