madr
2010-Dec-07 17:17 UTC
[R] please show me simple example how to plot "Distance-Weighted Least Squares" fitting
I got simple x,y pairs of data and simple scatterplot and just cannot figure how to do it , there are many examples but always there is error popping out please show me an example stripped with additional data just core of what I need to do to get this damn line -- View this message in context: http://r.789695.n4.nabble.com/please-show-me-simple-example-how-to-plot-Distance-Weighted-Least-Squares-fitting-tp3076824p3076824.html Sent from the R help mailing list archive at Nabble.com.
Sarah Goslee
2010-Dec-07 17:29 UTC
[R] please show me simple example how to plot "Distance-Weighted Least Squares" fitting
It's impossible to give you really good advice without an example of your data, the R code you used and the error message. But here's a simple scatterplot example: fakedata <- data.frame(x=runif(15), y=runif(15)) plot(fakedata$x, fakedata$y) or since you mentioned a line: fakedata <- fakedata[order(fakedata$x),] plot(fakedata$x, fakedata$y, type="l") For anything more, we would need the information requested in the R-help posting guide linked at the bottom of each and every R-help message. Sarah On Tue, Dec 7, 2010 at 12:17 PM, madr <madrazel at interia.pl> wrote:> > I got simple x,y pairs of data and simple scatterplot and just cannot figure > how to do it , there are many examples but always there is error popping out > > please show me an example stripped with additional data just core of what I > need to do to get this damn line > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Sarah Goslee http://www.functionaldiversity.org
Maybe Matching Threads
- increase or decrease variable by 1
- how to get rid of unused space on all 4 borders in plot() render
- "negative alpha" or custom gradient colors of data dots in scatterplot ?
- [beginner] simple keyword to exit script ?
- longer object length is not a multiple of shorter object length