![]() ![]() The standard deviation is used to draw the error bars on the graph. In the example below, we’ll plot the mean value of Tooth length in each group. Three dose levels of Vitamin C (0.5, 1, and 2 mg) with each of two delivery methods are used : library(ggplot2) It describes the effect of Vitamin C on tooth growth in Guinea pigs. Tapply(iris$Petal.ToothGrowth data is used. #find the minimum Petal.Width of each of the three Species Tapply(iris$Sepal.Width, iris$Species, mean) #find the mean Sepal.Width of each of the three Species Tapply(iris$Sepal.Length, iris$Species, max) #find the max Sepal.Length of each of the three Species # Sepal.Length Sepal.Width Petal.Length Petal.Width Species He lived and wrote in Hancock, New Hampshire. Tapply died in July 2009 after a battle with Leukemia. The following code illustrates an example of using tapply() on the built-in R dataset iris. Tapply was the author of dozens of books, including more than two dozen New England-based mystery novels and nearly a thousand magazine articles, mostly about fly fishing and the outdoors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |