I have a data frame with 25000 rows containing two columns Time and Distance. When I plot a simple distance versus time plot, the plot is very confusing showing no general trend because of the large data. Is there any way I can improve the plot by lets say using moving average as in EXCEL ? please also suggest some other methods to make the graph smoother and better looking. Gaurav -- View this message in context: http://www.nabble.com/plotting-huge-data-tp24860155p24860155.html Sent from the R help mailing list archive at Nabble.com.
?supsmu ?filter Sent from my iPhone On Aug 7, 2009, at 3:28, gauravbhatti <gaurav15984 at hotmail.com> wrote:> > I have a data frame with 25000 rows containing two columns Time and > Distance. > When I plot a simple distance versus time plot, the plot is very > confusing > showing no general trend because of the large data. Is there any way > I can > improve the plot by lets say using moving average as in EXCEL ? > please also > suggest some other methods to make the graph smoother and better > looking. > Gaurav > -- > View this message in context: http://www.nabble.com/plotting-huge-data-tp24860155p24860155.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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.
Hello, On Fri, Aug 7, 2009 at 8:28 AM, gauravbhatti<gaurav15984 at hotmail.com> wrote:> I have a data frame with 25000 rows containing two columns Time and Distance. > When I plot a simple distance versus time plot, the plot is very confusing > showing no general trend because of the large data. Is there any way I can > improve the plot by lets say using moving average as in EXCEL ? please also > suggest some other methods to make the graph smoother and better looking. >library(playwith) may help with zooming the plots. Liviu
gauravbhatti wrote:> I have a data frame with 25000 rows containing two columns Time and Distance. > When I plot a simple distance versus time plot, the plot is very confusing > showing no general trend because of the large data. Is there any way I can > improve the plot by lets say using moving average as in EXCEL ? please also > suggest some other methods to make the graph smoother and better looking. > GauravI recommend using the quantreg package to fit a quantile regression model using a spline function of Time. Draw the estimated curves for selected quantiles such as 0.1 0.25 0.5 0.75 0.9. A new function Rq in the Design package makes this easier but you can do it with just quantreg. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University