[R] fitting log function: errors using nls and nlxb

2013-07-09 Thread Elizabeth Webb
Hi- I am trying to fit a log function to my data, with the ultimate goal of finding the second derivative of the function. However, I am stalled on the first step of fitting a curve. When I use the following code: FG2.model<-(nls((CO2~log(a*Time)+b), start=setNames(coef(lm(CO2 ~ log(Time), data=F

Re: [R] nls NAs

2012-10-14 Thread Elizabeth Webb
Hello all- I got some help on this. While it did not fix the problem with nls, one can get around the problem by creating a data frame with the NAs excluded. As follows: goodidx<-which(! is.na(warming$T10cm)) warming2<-warming[goodidx,] warm.10<-nls(umoles60~alpha*exp(beta*T10cm),start = start,

[R] nls NAs

2012-10-11 Thread Elizabeth Webb
Hi- I am using the following code: start=c(alpha=0.4,beta=0.4) warm.10<-nls(warming$umoles60~alpha*exp(beta*warming$T10cm),start = start,data=warming,na.action=na.omit) This code works for other columns in my dataset that are similar to $T10cm but the code does not work for this particular

[R] Gettting barchart titles as numbers not characters

2008-06-26 Thread Elizabeth Webb
Hi, I wonder if you could help me with my barcharts, I am using the barchart function from the lattice library. I have data like this: Complex,Organisms,Percentage 130,0,50 130,1,10 130,2,20 130,3,15 130,4,5 133,0,10 133,1,15 133,2,20 133,3,50 133,4,5 I draw barcharts using this command... bar