search for: tempsum

Displaying 5 results from an estimated 5 matches for "tempsum".

2005 May 12
2
tempsum
hi, i'd like to calculate a temperatursum, adding the value of each element. let's say the data looks like this: x<-c(1,2,3,4,5) what i want to do, is ploting not the sum in the end but all the subresults, too, so my vector holds: x[i] [1] 1,3,6,10,15 here is what i tried, which seems to be right to me, bu doesn't work out: x<-c(1,2,3,4,5) i<-1 j<-1
2007 Feb 18
3
User defined split function in rpart
Dear R community, I am trying to write my own user defined split function for rpart. I read the example in the tests directory and I understand the general idea of the how to implement user defined splitting functions. However, I am having troubles with addressing the data frame used in calling rpart in my split functions. For example, in the evaluation function that is called once per node,
2013 Mar 28
1
make R program faster
...calculates day wise values (values are depenend from the output of the day before). First I create a data.frame with NAs. Finally each row contains the daily values. output <- as.data.frame(matrix(nrow = 365, ncol = 50)) for (day in (1:365)) { ... r <- list(Date=d,daylength=daylength,TempSum=tempsum, ...) output[day,] <- r } Is there an better (faster) way to do such things in R? Greetings Christof
2012 May 31
1
fitting allometric equation using a for a power model
...iley.com/doi/10.1002/etc.5620120618/abstract(page 1130) but that doesn't seem to help much - if anything the fit looks worse. Data and code below: temppow<-lm(log(y)~log(x)) plot(log(y)~log(x)) plot(residuals(temppow), main="pow") abline(temppow) plot(y~x, main="pow") tempsum<-summary(temppow)$adj.r.squared tempint<-summary(temppow)$coefficients[1,1] #intercept of power function tempslope<-summary(temppow)$coefficients[2,1] #slope of power function tempmin<-min(x) tempmax<-max(x) lngth<-c(tempmin:tempmax) # vector from the minimum to the maximum values...
2007 Jul 25
0
Function polr and discrete ordinal scale
...ow how to bring the cumulated probabilities back to a discrete ordinal scale. For the moment I used the predict.polr function with the argument "class". Is there an other way? polrf <- polrf <- polr_mod(formula = acipenser_gueldenstaedtii ~ Long + poly(Surf, 2, raw = TRUE) + poly(TempSum, 2, raw = TRUE) , data = mydata, method = "logistic", Hess = TRUE, na.action = na.omit) pred1 <- predict.polr(polrf, newdata = mydata2, type = "class") predict.polr <- function(object, newdata, type=c("class","probs"), ...) { if(!inherits(object,...