官术网_书友最值得收藏!

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:

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.

主站蜘蛛池模板: 永登县| 兖州市| 红桥区| 万安县| 德兴市| 分宜县| 土默特右旗| 营口市| 深水埗区| 陇西县| 定安县| 鱼台县| 河西区| 汕尾市| 通渭县| 阿瓦提县| 茶陵县| 扶余县| 紫金县| 普格县| 镇赉县| 沾化县| 福泉市| 阳西县| 越西县| 安陆市| 陇西县| 香港| 罗山县| 建阳市| 当阳市| 株洲市| 胶南市| 克什克腾旗| 康平县| 临漳县| 成安县| 措勤县| 鹤峰县| 垣曲县| 平利县|