[R] question about non-linear least squares in R

2007-09-05 Thread Yu (Warren) Wang
it? To use another funtion or to modify some settings for nls? Thank you very much! Yours, Warren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

[R] difftime for handling time units--hours, minutes, days--from file times

2006-11-17 Thread Warren
Thanks, Tim To get the time difference in the proper units, it's as simple as this: difftime(myfileinfo$mtime[2], myfileinfo$mtime[1], units=hours) Cheers, Warren On 11/13/06, Tim Calkins [EMAIL PROTECTED] wrote: hardly the most efficient way to go, but consider using a substring function

[R] creating and calling objects based on elements of another object...

2006-11-17 Thread Warren
of making an immense dataframe, and I'm trying to get through the R language definition documentation to build these functions--any expert advice would be tremendously helpful. Thanks for your time. Cheers, Warren Warren G. Lewis [EMAIL PROTECTED] __ R-help

[R] handling time units--hours, minutes, days--from file times

2006-11-13 Thread Warren
. Thanks in advance, -- Warren #Here is the failed code: myfilenames-row.names(myfileinfo) fileno-length(myfilenames) filetimes-numeric() for (i in 2:fileno){rel.read.time-myfileinfo$mtime[i]-myfileinfo$mtime[1] rel.read.time-(as.numeric(rel.read.time)) ##this next part is problematic ##i

[R] during fitting of successive datasets, stall crashes iterations

2006-10-10 Thread Warren
,--Warren ##The code looks something like this: attach(zf) x - hours n-length(zf[,2]) for (i in 2:n) {y - zf[,i] plot(y ~ x, xlab = Time (h), ylab = Lumi, pch = 15) # fitting algorithm looks like this: sine- nls (y ~ baseline + trend*x + amplitude*(sin(2*pi*(x+phase)/period)), start=list(baseline

[R] recursive methods for concatenating sets of files

2006-09-13 Thread Warren
, and translating each filename into a header? Please excuse my ignorance, and help cure my clunky programming (below) with more elegant code. Thanks, Warren data0 -read.delim(t.txt, quote=, as.is=TRUE) data1 -read.delim(t (1).txt, quote=, as.is=TRUE) data2 -read.delim(t (2).txt, quote=, as.is=TRUE) data3

[R] R equivalent to Fortran, GAUSS, or Perl's goto

2005-08-10 Thread Warren Lamboy
Does R have something equivalent to the goto in Perl? If so, can you please tell me what it is? I cannot find it in the Ref Manual or the Language Manual. Thanks. - Warren Warren Lamboy USDA-ARS Plant Genetic Resources Unit Geneva, NY, USA 14456

Re: [R] R equivalent to Fortran, GAUSS, or Perl's goto

2005-08-10 Thread Warren Lamboy
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Rowlingson Sent: Wednesday, August 10, 2005 5:23 AM To: r-help@stat.math.ethz.ch Subject: Re: [R] R equivalent to Fortran, GAUSS, or Perl's goto Warren Lamboy wrote: Does R have something equivalent