Nathaniel Saxe
2010-Jul-08 16:00 UTC
[R] How can i draw a graph with high and low data points
Hi, This is my first time so bear with me if I do anything silly. I'll learn! I'm a relatively new user of R as well so will appreciate any help. I have a data set in the form Trial.Group MeanHeart Rate Upper confidence level Lower confidence level 333subj: 0-5 M 80 60 120etcetc I want to plot a graph that has Trial.Group on the x axis(names, not just an index number), Heart rate on the y axis with the Mean and upper and lower confidence levels. Then add a line linking the upper and lower confidence interval together and for the Mean heart rate values to go from high to low (descending ). Thanks henry gu _________________________________________________________________ [[alternative HTML version deleted]]
Hi Nathaniel, Here are a few links for (short) articles that can help you get comfortable in doing such tasks: http://www.statmethods.net/graphs/line.html http://www.statmethods.net/graphs/scatterplot.html Here is a tiny example: x <- 1:100 y <- rnorm(100) plot(y~x) lines(loess(y~x)$fitted ~ x) lines(loess(y~x)$fitted + 1.96 ~ x, col = 2, lty = 2) lines(loess(y~x)$fitted - 1.96 ~ x, col = 2, lty = 2) ----------------Contact Details:------------------------------------------------------- Contact me: Tal.Galili@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---------------------------------------------------------------------------------------------- On Thu, Jul 8, 2010 at 7:00 PM, Nathaniel Saxe <nathanielsaxe@hotmail.com>wrote:> > Hi, > This is my first time so bear with me if I do anything silly. I'll learn! > I'm a relatively new user of R as well so will appreciate any help. > I have a data set in the form > Trial.Group MeanHeart Rate Upper confidence level > Lower confidence level > 333subj: 0-5 M 80 60 > 120etcetc > > I want to plot a graph that has Trial.Group on the x axis(names, not just > an index number), Heart rate on the y axis with the Mean and upper and lower > confidence levels. Then add a line linking the upper and lower confidence > interval together and for the Mean heart rate values to go from high to low > (descending ). > Thanks > > henry gu > _________________________________________________________________ > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Seemingly Similar Threads
- Partitioning around mediods (PAM)
- Bias-corrected percentile confidence intervals
- Unable to get the domain in my routes.rb to map custom route tables per domain
- Finding the bootstrapped coefficient of variation and the stderr on the CV(boot)
- Canada on Rails - Schedule Released