Hello,
I'm trying to subset a dataframe where I have many observation taken in
different years.
I would like to subset the dataframe (in this example called "table") to get a
new dataframe containing only the
observation of year 1995, 1998 and 2000.
I've tried to use subset and the or operator "
Hello,
I'm a beginner with R and it's the first time I'm using the R-help list... I
hope I'm in the right place, if not:
Sorry!!
I need to do non linear regressions on a data set which columns are:
"river.name""Portata" "PTG.P" "PO4.P" "NT.N""NH4.N" "NO3.N"
"BOD5""SiO2"
Thank you a lot Mr. Ritz!
I've tried the loop you suggested and I added a list for lower and upper limits
of the parameters, but there is still
a problem...
I have a list of functions, which works...
fz1<-function(Portata, a, b){a+(b/Portata)}
fz2<-function(Portata, a, b){a*exp(b*Portata)}
fz3
e how
can someone specify the groups/subset?
Thanks a lot!
Laura
Messaggio originale
Da: kfr...@wisc.edu
Data: 03.02.2009 15.36
A:
Oggetto: Re: [R] non linear regression with nls
Hi, Laura-
You might have a look at ?nlsList().
Ken
- Original Message -
From: "
Thank you! It worked perfectly, also for the other variables!
Messaggio originale
Da: r...@life.ku.dk
Data: 06.02.2009 13.29
A:
Oggetto: Re: [R] non linear regression with nls
Hi Laura,
I think you have to make a list formulas:
formList <- list(NT.N ~ fz1(Portata, a, b), NT.N ~ fz2(Po
Hello,
to plot the result of a singular non linear regression (using nls) I usually
use the function plotfit, for example:
r.PTG.V<-nls(PTG.P~ fz1(Portata, a,b), data=dati, start=list(a=10, b=10),
nls.control(maxiter=200), algorithm='port',
trace=TRUE, na.action=na.omit, lower=list(a=0, b=10),
Hello,
I'm using the following for loop to find regression curves using a list of
functions (formList), a list of starting
values (startList), uppervalues (upperList) and lower values (lowerList).
A sample of the list of function I use in the loop is the following:
FormList <- list(PTG.P ~ fz1(P
Hello,
I would like to save different plots and some text (like summaries, AIC, ...)
on the same file.
I've read the e-mails entitled "Output results to a single postscript document"
written some days ago and I've tried
to use the function odfInsertPlot() in the package "odfWeave" but it doesn'
Oggetto: Re: [R] plotting the result of a nonlinear regression
?predict
On Tue, Feb 10, 2009 at 11:06 AM, lauramorg...@bluewin.ch
wrote:
> Hello,
> to plot the result of a singular non linear regression (using nls) I usually
> use the function plotfit, for
example:
>
> r.P
Hello Dieter and everyone,
Thank you for your advice... but I didn't manage to solve my problem... :-(
I actually like the fact that R tells me which ones of my regressions didn't
achieve convergence and gives me a
warning saying that there was a false or singular convergence...
the problem is t
Thank you a lot!!! That was fantastic! It worked perfectly!!!
Laura
Hi Laura,
try using the functions try() and inherits() to "catch" any errors in the loop:
summaryList <- list()
for (i in 1:35)
{
tempSummary <- try(summary(resultList[[i]]), silent = TRUE)
if (inherits(tempSummary, "tr
Hello,
I've been trying to use odfWeave and prettyR packages to create documents with
both text and graphs, but so far I
haven't been very lucky...
With the function R2html () in prettyR package, when I try to use a source
file, which works perfectly if I run it
directly form R using "source("f
Hello Stephane,
here is something you could try,
filelist <- c("file1.txt", "file2.txt", "file3.txt")
for (i in 1:3) {
tmpList<-try(read.table(filelist[[i]]), silent=TRUE)
if(inherits(tmpList, "try-error"))
{print(paste("error opening file ", filelist[[i]]))
} else {
tmp<-read.table(filelist[[i]]
Hello,
I tried to turn lists into vectors and then bind them together in order to
create a dataframe but if, after this, I
try to use the function write.table I get the following error message:
Error in write.table(x, file, nrow(x), p, rnames, sep, eol, na, dec,
as.integer(quote), :
'list'
If, suppose, the name of your dataframe is "dataframe" , you could try
something like:
mean60days<-c()
for(i in 1:length(dataframe$SST))
+ {
+ mean60days[[i]]<-mean(dataframe$SST[i-10:i])
+ }
I'm not really sure it will work... my skills aren't that great...
Anyway, it worked on a sample I tried i
Sorry, I meant:
If, suppose, the name of your dataframe is "dataframe" , you could try
something like:
mean60days<-c()
for(i in 1:length(dataframe$SST))
+ {
+ mean60days[[i]]<-mean(dataframe$SST[i-60:i])
+ }
I'm not really sure it will work... my skills aren't that great...
Anyway, it worked on a
Sorry, I'm using R 2.8.1 on Microsoft Windows XP professional 2002 Service Pack
2.
The error I get is
Error in write.table(x, file, nrow(x), p, rnames, sep, eol,
> na, dec, as.integer(quote), :
'list' type not implemented in 'EncodeElement'
The problem is that I can' t manage to save the
ist"
I thought that the function as.vector() could turn a list of numbers into a
vector... was I wrong?
----Messaggio originale
Da: rip...@stats.ox.ac.uk
Data: 20.02.2009 12.40
A: "lauramorg...@bluewin.ch"
Copia:
Oggetto: Re: [R] write.table
On Fri, 20 Feb 2009, lauramorg.
.4697276 -1.2026201 -1.4366955 -1.4713526
use unlist
> unlist(x)
[1] -0.7349324 -0.4697276 -1.2026201 -1.4366955 -1.4713526
>
Regards
Petr
> I thought that the function as.vector() could turn a list of numbers
into a
> vector... was I wrong?
>
> Messaggio originale---
19 matches
Mail list logo