similar to: Trying to avoid loop structure

Displaying 20 results from an estimated 1000 matches similar to: "Trying to avoid loop structure"

2009 Aug 18
1
aggregating values at discreet irregular time intervals into hourly values
Hello R users, I'm a newby to R (and programming software at large) and I would need some help to sum up event data at discreet time and irregular time interval into a hourly frequency. Here is an example of my time series frame (irregular time-serie object - irts in the tseries package): time value 2008-12-19 19:11:03 GMT 1 2008-12-19 19:12:00 GMT 0 2008-12-19
2009 Apr 22
1
plot.logistic.fit.fnc
Hello, I can not get the function plot.logistic.fit.fnc() working....it returns "Error: could not find function "plot.logistic.fit.fnc"". Do I need to upload as specific package first? I am trying to check the fit of a mixed logistic model. Also, any advice for checking the assumption of independence in a mixed logistic model? Many thanks in advance, Sarah Foster
2010 Dec 24
1
lattice regression coefficients
Dear list I am sorry to have to ask this question, but I have not been able to find a solution to what seems a simple problem. I have created a lattice plot of a number of regression points and lines using a function containing panel.xyplot and panel.lmline. The result is what is expected , but I cannot figure out how to obtain the coefficients of each of the regression lines. Any help
2006 Jan 20
1
indexing within a function
Hello all, I've got a large set of data consisting of 2 continuous numerical variables, and 2 factors. I'm trying to write a function that will draw scatter plots of the 2 numerical variables for various combinations of the factors. The problem is that my function doesn't seem to understand what I want it to do even though the command works fine outside the function. Here is
2008 Mar 24
0
Error using augPred with nlme grouped data
Hello all, I am having a problem using augPred after I have created an nlme object. My data is 3933 rows long with no NA's, and is grouped with this function: vanfem<-groupedData(mass~age.years|name, data=av.mex, labels=list(x="Age", y="Mass"), units=list(x="(years)", y="(kg)")) Under the grouping factor "name", this is a character
2007 Oct 22
1
Meta-analysis mixed model
I have a meta-analysis dataset which I would like to analyze as a mixed model, where the y-variable is a measure of effect size, the random effect is the study from which the effect size was extracted, and the fixed effect is a categorical explanatory variable. The complication is that we often have multiple estimates of effect size from a single study (e.g. the experiment was repeated in
2007 Aug 21
1
quantile() returns a value outside the data range
Hello, I am getting an unexpected result from quantile(). Specifically, the return value falls outside the range of the data, which I wouldn't have thought possible for a weighted average of 2 order statistics. Is this an unintended accuracy issue or am I being too casual in my comparison (is there some analogue of 'all.equal' for "<=")? Small example: > foo <-
2002 Mar 01
2
step, leaps, lasso, LSE or what?
Hi, I am trying to understand the alternative methods that are available for selecting variables in a regression without simply imposing my own bias (having "good judgement"). The methods implimented in leaps and step and stepAIC seem to fall into the general class of stepwise procedures. But these are commonly condemmed for inducing overfitting. In Hastie, Tibshirani and Friedman
2007 Apr 11
0
Error with corCompSymm and lme fit for repeated measures
Dear R Friends, I need help with an error associated with corCompSymm in an lme fit. I am using a mixed effects model to analyze a split-plot with repeated measures and would like to fit with the compound symmetry correlation structure. This problem doesn't occur when using corAR1 or any of the other structures. I would greatly appreciate help on how to solve this issue. Here's my
2012 Jan 17
2
Which date format to choose?
R offers a bewildering array of options when it comes to representing dates and times (e.g, as.Date, chron, strptime, zoo, etc). Can anybody recommend a document that compares the relative merit of each method? I'm not looking for help with any one method, but rather a guide that describes which method is best for a particular data analysis/plotting goal. Thanks, Jake [[alternative
2011 Sep 16
3
Help writing basic loop
Hello, I would like to write a loop to 1) run 100 linear regressions, and 2) compile the slopes of all regression into one vector. Sample input data are: y1<-rnorm(100, mean=0.01, sd=0.001) y2<-rnorm(100, mean=0.1, sd=0.01) x<-(c(10,400)) #I have gotten this far with the loop for (i in 1:100) { #create the linear model for each data set model1<-lm(c(y1[i],y2[i])~x)
2010 Aug 06
2
Stopping precision using 'optim'
Hi all~ I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'? If it helps, I am minimizing the log-likelihood of a function using constraints (i.e. L-BFG-S). -Jeremy
2008 Sep 10
3
writing simple function through script
Hi all, I try to write a simple function in a script. The script is as follows yo<-function(Xdata) { n<-length(Xdata[,1]) Lgm<-nls(formula=LgmFormula, data=Xdata, start=list(a=1500,b=0.1),weights=Xdata$Qe) return(Lgm) } After the execution of the script, when I call the function yo on data called NC60.DATA I get an error. #yo(NC60.DATA) Erreur dans eval(expr, envir, enclos)
2014 Nov 12
2
Connection failing between 2 nodes with dropped packets error
Hi, I'm sometimes getting a failure of connecting 2 nodes when Tinc is started and configured in a LAN. In the logs, there are some unexpected dropped packets with very high or negative seq. I can reproduce this issue ~2% of the time. When this happens, the 2 nodes can no longer ping or ssh each other through the tunnel interface but using eth0 works fine. The connection can recover after at
2014 Nov 24
1
Connection failing between 2 nodes with dropped packets error
Cipher is enabled with the default setting (Blowfish CBC) Digest is disabled Compression is disabled MACLength is the default (4 if I remember correctly) I suspect that the issue is related to the encryption. I tried disabling encryption and the issue wasn?t reproduced during an automated test run of 400 reconnections. Regards, Alexandre Beaulieu > On Nov 22, 2014, at 3:19 PM, Guus Sliepen
2008 Sep 03
2
nls convergence trouble
Hi, Parameters assessment in R with nls doesn't work, though it works fine with MS Excel with the internal solver :( I use nls in R to determine two parameters (a,b) from experimental data. m V C0 Ce Qe 1 0.0911 0.0021740 3987.581 27.11637 94.51206 2 0.0911 0.0021740 3987.581 27.41915 94.50484 3 0.0911 0.0021740 3987.581 27.89362
2008 Oct 07
1
Lapack: SSYEV routine
Hi everyone, I am interested in using the SSYEV Lapack subroutine in a R package. Unfortunately I am not familiar with the all Lapack library and I was wondering why the routine SSYEV is not part of the R-LAPACK interface module. Is there any plan to extend the R-Lapack module in the next R release? Should I try to directly call the SSYEV routine of the external Lapack library from my R
2008 Sep 18
1
axis text size in scatter plot
Hi, Quite simple question I guess. Where could we specify the size of the text (axis,legend) for a scatter plot graphic made with plot()? Regards/Cordialement ------------- Benoit Boulinguiez Ph.D Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes" Campus de Beaulieu, 263 Avenue du Général Leclerc 35700 Rennes, France Tel 33 (0)2 23
2008 Sep 23
1
superscript text style in axis label in graph
Hi all, I'd like to use superscript or subscript in the axis label of a graph. Is that possible in R? For instance in xlab="Ce (mmol/m3)", I'd need the "3" of cubic meter in superscript. Regards/Cordialement ------------- Benoit Boulinguiez Ph.D Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes" Campus
2008 Sep 30
1
par() default values
Hi all, Is that possible to get back to the par() default values easily? I played a bit with par() Regards/Cordialement ------------- Benoit Boulinguiez Ph.D Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes" Campus de Beaulieu, 263 Avenue du Général Leclerc 35700 Rennes, France Tel 33 (0)2 23 23 80 83 Fax 33 (0)2 23 23 81 20