[R] Piecewise nls w/ boundary as a fitting parameter

2010-05-19 Thread Primoz PETERLIN
Hello, Fitting a piecewise smooth curve to a set of points (and a piecewise linear function in particular) seems to be a recurring question on this list. Nevertheless, I was not able to find an answer to a question that bothers me. Suppose I have the following data set, and would want to fit it w

[R] Multiple symbols per single line in a legend

2010-01-12 Thread Primoz PETERLIN
Hello everybody, Is it possible to coax legend() into displaying more than one simbol per line in legend? I have a graph like the one attached to this mail; I would like to reorganize the legend in such a way that the duplicate text would be omitted, i.e., the first line would read "increasing f

Re: [R] Substituting the extracted coefficients into the formula, exctracted from the result of nls()

2009-10-11 Thread Primoz PETERLIN
Thank you. I guess using predict() is probably closest to the R philosophy. All the best, Primož 2009/10/9 Henrique Dallazuanna : > Try with predict: > > plot(x, y) > lines(0:10, predict(yfit, list(x = 0:10))) > > 2009/10/9 Primoz PETERLIN : >> Dear all, >> >

[R] Substituting the extracted coefficients into the formula, exctracted from the result of nls()

2009-10-09 Thread Primoz PETERLIN
Dear all, Here I come with another stupid question. Suppose I want to use nls() to fit a series of data (here modelled by generated points), then plot the points and the fitting curve. I figured out some way of doing it: x <- runif(1:20, 0, 10) y <- 0.1*x^2 - rep(3, length(x)) + rnorm(length(x),

Re: [R] Re gression line w/ residuals - tuning the plot

2009-10-02 Thread Primoz PETERLIN
oma etc. may be interesting for you. And for the relation between > y-axis and x-axis, the option asp to function plot (?plot.default) will > help. > > Regards, Ulrike > > > > Primoz PETERLIN-2 wrote: >> >> Hello everybody, >> >> I am sure this is a b

[R] Regression line w/ residuals - tuning the plot

2009-09-28 Thread Primoz PETERLIN
Hello everybody, I am sure this is a beginners' problem which is being asked recurrently every few months, but nevertheless I wasn't able to find the answer searching through the r-help list. So here is my problem: I would like to plot a set of points (y vs. x), a (linear) regression line through