R Graphics Cookbook - Helion
ebook
Autor: Winston ChangISBN: 978-14-493-6310-9
stron: 416, Format: ebook
Data wydania: 2012-12-05
Księgarnia: Helion
Cena książki: 118,15 zł (poprzednio: 137,38 zł)
Oszczędzasz: 14% (-19,23 zł)
This practical guide provides more than 150 recipes to help you generate high-quality graphs quickly, without having to comb through all the details of R’s graphing systems. Each recipe tackles a specific problem with a solution you can apply to your own project, and includes a discussion of how and why the recipe works.
Most of the recipes use the ggplot2 package, a powerful and flexible way to make graphs in R. If you have a basic understanding of the R language, you’re ready to get started.
- Use R’s default graphics for quick exploration of data
- Create a variety of bar graphs, line graphs, and scatter plots
- Summarize data distributions with histograms, density curves, box plots, and other examples
- Provide annotations to help viewers interpret data
- Control the overall appearance of graphics
- Render data groups alongside each other for easy comparison
- Use colors in plots
- Create network graphs, heat maps, and 3D scatter plots
- Structure data for graphing
Osoby które kupowały "R Graphics Cookbook", wybierały także:
- Windows Media Center. Domowe centrum rozrywki 66,67 zł, (8,00 zł -88%)
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Przywództwo w świecie VUCA. Jak być skutecznym liderem w niepewnym środowisku 58,64 zł, (12,90 zł -78%)
- Scrum. O zwinnym zarządzaniu projektami. Wydanie II rozszerzone 58,64 zł, (12,90 zł -78%)
- Od hierarchii do turkusu, czyli jak zarządzać w XXI wieku 58,64 zł, (12,90 zł -78%)
Spis treści
R Graphics Cookbook. Practical Recipes for Visualizing Data eBook -- spis treści
- R Graphics Cookbook
- A Note Regarding Supplemental Files
- Preface
- Recipes
- Software and Platform Notes
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. R Basics
- Installing a Package
- Loading a Package
- Loading a Delimited Text Data File
- Loading Data from an Excel File
- Loading Data from an SPSS File
- 2. Quickly Exploring Data
- Creating a Scatter Plot
- Creating a Line Graph
- Creating a Bar Graph
- Creating a Histogram
- Creating a Box Plot
- Plotting a Function Curve
- 3. Bar Graphs
- Making a Basic Bar Graph
- Grouping Bars Together
- Making a Bar Graph of Counts
- Using Colors in a Bar Graph
- Coloring Negative and Positive Bars Differently
- Adjusting Bar Width and Spacing
- Making a Stacked Bar Graph
- Making a Proportional Stacked Bar Graph
- Adding Labels to a Bar Graph
- Making a Cleveland Dot Plot
- 4. Line Graphs
- Making a Basic Line Graph
- Adding Points to a Line Graph
- Making a Line Graph with Multiple Lines
- Changing the Appearance of Lines
- Changing the Appearance of Points
- Making a Graph with a Shaded Area
- Making a Stacked Area Graph
- Making a Proportional Stacked Area Graph
- Adding a Confidence Region
- 5. Scatter Plots
- Making a Basic Scatter Plot
- Grouping Data Points by a Variable Using Shape or Color
- Using Different Point Shapes
- Mapping a Continuous Variable to Color or Size
- Dealing with Overplotting
- Adding Fitted Regression Model Lines
- Adding Fitted Lines from an Existing Model
- Adding Fitted Lines from Multiple Existing Models
- Adding Annotations with Model Coefficients
- Adding Marginal Rugs to a Scatter Plot
- Labeling Points in a Scatter Plot
- Creating a Balloon Plot
- Making a Scatter Plot Matrix
- 6. Summarized Data Distributions
- Making a Basic Histogram
- Making Multiple Histograms from Grouped Data
- Making a Density Curve
- Making Multiple Density Curves from Grouped Data
- Making a Frequency Polygon
- Making a Basic Box Plot
- Adding Notches to a Box Plot
- Adding Means to a Box Plot
- Making a Violin Plot
- Making a Dot Plot
- Making Multiple Dot Plots for Grouped Data
- Making a Density Plot of Two-Dimensional Data
- 7. Annotations
- Adding Text Annotations
- Using Mathematical Expressions in Annotations
- Adding Lines
- Adding Line Segments and Arrows
- Adding a Shaded Rectangle
- Highlighting an Item
- Adding Error Bars
- Adding Annotations to Individual Facets
- 8. Axes
- Swapping X- and Y-Axes
- Setting the Range of a Continuous Axis
- Reversing a Continuous Axis
- Changing the Order of Items on a Categorical Axis
- Setting the Scaling Ratio of the X- and Y-Axes
- Setting the Positions of Tick Marks
- Removing Tick Marks and Labels
- Changing the Text of Tick Labels
- Changing the Appearance of Tick Labels
- Changing the Text of Axis Labels
- Removing Axis Labels
- Changing the Appearance of Axis Labels
- Showing Lines Along the Axes
- Using a Logarithmic Axis
- Adding Ticks for a Logarithmic Axis
- Making a Circular Graph
- Using Dates on an Axis
- Using Relative Times on an Axis
- 9. Controlling the Overall Appearance of Graphs
- Setting the Title of a Graph
- Changing the Appearance of Text
- Using Themes
- Changing the Appearance of Theme Elements
- Creating Your Own Themes
- Hiding Grid Lines
- 10. Legends
- Removing the Legend
- Changing the Position of a Legend
- Changing the Order of Items in a Legend
- Reversing the Order of Items in a Legend
- Changing a Legend Title
- Changing the Appearance of a Legend Title
- Removing a Legend Title
- Changing the Labels in a Legend
- Changing the Appearance of Legend Labels
- Using Labels with Multiple Lines of Text
- 11. Facets
- Splitting Data into Subplots with Facets
- Using Facets with Different Axes
- Changing the Text of Facet Labels
- Changing the Appearance of Facet Labels and Headers
- 12. Using Colors in Plots
- Setting the Colors of Objects
- Mapping Variables to Colors
- Using a Different Palette for a Discrete Variable
- Using a Manually Defined Palette for a Discrete Variable
- Using a Colorblind-Friendly Palette
- Using a Manually Defined Palette for a Continuous Variable
- Coloring a Shaded Region Based on Value
- 13. Miscellaneous Graphs
- Making a Correlation Matrix
- Plotting a Function
- Shading a Subregion Under a Function Curve
- Creating a Network Graph
- Using Text Labels in a Network Graph
- Creating a Heat Map
- Creating a Three-Dimensional Scatter Plot
- Adding a Prediction Surface to a Three-Dimensional Plot
- Saving a Three-Dimensional Plot
- Animating a Three-Dimensional Plot
- Creating a Dendrogram
- Creating a Vector Field
- Creating a QQ Plot
- Creating a Graph of an Empirical Cumulative Distribution Function
- Creating a Mosaic Plot
- Creating a Pie Chart
- Creating a Map
- Creating a Choropleth Map
- Making a Map with a Clean Background
- Creating a Map from a Shapefile
- 14. Output for Presentation
- Outputting to PDF Vector Files
- Outputting to SVG Vector Files
- Outputting to WMF Vector Files
- Editing a Vector Output File
- Outputting to Bitmap (PNG/TIFF) Files
- Using Fonts in PDF Files
- Using Fonts in Windows Bitmap or Screen Output
- 15. Getting Your Data into Shape
- Creating a Data Frame
- Getting Information About a Data Structure
- Adding a Column to a Data Frame
- Deleting a Column from a Data Frame
- Renaming Columns in a Data Frame
- Reordering Columns in a Data Frame
- Getting a Subset of a Data Frame
- Changing the Order of Factor Levels
- Changing the Order of Factor Levels Based on Data Values
- Changing the Names of Factor Levels
- Removing Unused Levels from a Factor
- Changing the Names of Items in a Character Vector
- Recoding a Categorical Variable to Another Categorical Variable
- Recoding a Continuous Variable to a Categorical Variable
- Transforming Variables
- Transforming Variables by Group
- Summarizing Data by Groups
- Summarizing Data with Standard Errors and Confidence Intervals
- Converting Data from Wide to Long
- Converting Data from Long to Wide
- Converting a Time Series Object to Times and Values
- A. Introduction to ggplot2
- Background
- Index
- About the Author
- Colophon
- Copyright