[R] Using integrate

2008-07-21 Thread Ayman Oweida
I have a function, say: f<-function(x)  exp(x) and I would like to obtain the integration of the function while adding a few operations within the integration (I need point-by-point integration), say: t<-seq(0,40, by=1) z<-array(0,length(t)) for (i in 1:40){ z[i] <- integrate ( f *  (t [i+1] -

Re: [R] nonlinear fitting on many voxels

2008-06-09 Thread Ayman Oweida
(R1Tn[j]-R10T[j])-f(p))^2)   out <-  ( nlminb(c(0.1,0.25),res) ) cf[j]<-out$par[1] # fill the 1st estimated parameter for each voxel into cf } Thank you, Ayman --- On Mon, 6/9/08, Charles C. Berry <[EMAIL PROTECTED]> wrote: From: Charles C. Berry <[EMAIL PROTECTED]> Subject: Re:

[R] nonlinear fitting on many voxels

2008-06-09 Thread Ayman Oweida
After many months, I am now banging my head against the wall because I can't find a solution to this seemingly trivial problem.  Any help would be appreciated: I am trying to apply a nonlinear fitting routine to a 3D MR image on a voxel-by-voxel basis.  I've tested the routine using simulated d

[R] Extracting output data into a vector or matrix

2008-03-27 Thread Ayman Oweida
I've been struggling to do the following: After a lengthy computation, I receive an output along the lines of the list below. This list has 41 values and is not the end of my computations. I have another computation to do on the list below, but in this final computation the list is supposed

[R] Extracting single output data into a vector or matrix

2008-03-27 Thread Ayman Oweida
I've been struggling to do the following: After a lengthy computation, I receive an output along the lines of the list below. This list has 41 values and is not the end of my computations. I have another computation to do on the list below, but in this final computation the list is supposed