Histograms
Description
The following R command calculates a histogram for textbook costs. Note that R decides on the width of the bin.
To use R in a Sage cell, the language must be set to R. See https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst for details.
Sage Cell
Code
textbooks <- c( 35, 42, 37, 60, 50, 42, 50, 16, 58, 39, 33, 39, 23, 53, 51, 48, 41, 49, 62, 40, 45, 37, 62, 30, 23)
hist(textbooks)
Options
None
Tags
Primary Tags: Statistics: Exploratory data analysis/descriptive statistics
Secondary Tags: Exploratory data analysis/descriptive statistics: Graphical representations
Related Cells
- A stem-and-leaf plot with R. A stem-and-leaf plot of Babe Ruth's career home runs.
- Constructing Pie Charts with R. Constructing pie charts.
- Constructing Time Series Plots with R. Constructing time series plots.
Attribute
Permalink:
Author: T. Judson
Date: 19 Jul 2017 10:47
Submitted by: Tom Judson