- R Graphs Cookbook Second Edition
- Jaynal Abedin Hrishi V. Mittal
- 327字
- 2021-08-05 17:30:27
Introduction
In this chapter, we will see how to use R to make some very basic types of graphs, which can be used in almost any kind of analysis. The recipes in this chapter will give you a feel for how much can be accomplished with very little R code, which is one big reason why R is a good choice for an analysis platform.
Although the examples in this chapter are of a basic nature, we will go through all the steps to get you going from reading your data into R, making the first graph, tweaking it to suit your needs, and then saving and exporting it for use in presentations and publications.
First and foremost, you need to download and install R on your computer. All R packages are hosted on the Comprehensive R Archive Network or CRAN ( for all the three major operating systems at the following locations on the Web:
- Windows: http://cran.r-project.org/bin/windows/base/
- Linux: http://cran.r-project.org/bin/linux/
- Mac OS X: http://cran.r-project.org/bin/macosx/
Note
Read the FAQs ( CRAN website for detailed help on installation.
Just having the basic installation of R should set you up for all the recipes in this book.
Note that the R code in this book has some comments explaining the code. Any text on a line following the #
symbol is treated by R as a comment. For example, you might see something like this:
col="yellow" #Setting the color to yellow
As you can see clearly, the text after the #
explains what the code is doing, that is, setting the color to yellow in this case. Comments are a way of documenting code so that others reading your code can understand it better. It also serves to help you, and you can also understand your code better when you come back to it after a long period of time. Read each line of code carefully, and look out for any comments that will help you understand the code better.
- 觸摸屏實用技術與工程應用
- 筆記本電腦使用、維護與故障排除實戰
- Linux KVM虛擬化架構實戰指南
- The Applied AI and Natural Language Processing Workshop
- 現代辦公設備使用與維護
- 單片機原理及應用系統設計
- micro:bit魔法修煉之Mpython初體驗
- Mastering Adobe Photoshop Elements
- Large Scale Machine Learning with Python
- SiFive 經典RISC-V FE310微控制器原理與實踐
- 微型計算機系統原理及應用:國產龍芯處理器的軟件和硬件集成(基礎篇)
- BeagleBone Robotic Projects
- WebGL Hotshot
- 單片機原理及應用:基于C51+Proteus仿真
- FreeSWITCH Cookbook