错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Introduction to R

  • Robert Hirsch

摘要

RR is free statistical software that is available for download on the web. It is usually run from an interface called “RStudio.” RStudioRStudio is set up with four quadrants. The lower left is where the programs are run. The lower right is where the documentation is available and where graphic output appears. The upper right is where datasets are listed, and the upper left is where you can see the content of datasets. Creation of datasets usually starts with the creation of vectors in the lower left quadrant. These vectors can be combined to create a dataset or data frameData frame. A special kind of dataset is stored in a 2 × 2 matrixMatrix. These are often of use in epidemiology. We will be using several programs. These are arranged in packages. The “stats” package is the one we will use most often. Click on the name in the lower right quadrant to see a list of the programs available. Clicking on the name of the program invokes documentation on that program. Graphics are requested in the lower left quadrant, and they appear in the lower right quadrant. We use the “plotPlot” command to create graphs. The plot command has several options used to customize your graph. The graphs can have additional data displayed using the “points” command. You can create a legend for your graph using the “legend” command. A special kind of graph used in epidemiology can be created using the “stepfun” function.