The basic method of R language combat

Source: Internet
Author: User

The main functions of R language include data statistical analysis method and data visualization, data analysis in this chapter mainly learn to create basic graphics and basic data analysis

A basic graphic

1 bar Chart

Barplot (height)//Add a bar chart, height is a vector or matrix//

Legend.text//For the legend provides a label for each bar//

Spine ()// Draw a spine chart, download VCD Pack//

2 Pie chart

Pie (X,labels)

Fan.plot ()//Draw sector diagram//

3 histogram

hist ()

Meaning of each parameter: Freq=false means drawing a graph based on probability density rather than frequency, and break is used to control the number of groups

4 Kernel Density map

Plot (density (x))//plot is used to create a new set of graphics//

Line ()//overlay a density curve//

Sm.density.compare (X,factor)//overlay More kernel density graphs//to graphs//

5 Box Line diagram

BoxPlot ()

Boxplot.stats ()//output statistics for building graphs//

Parameters: Varwidth=true horizontal=true notch=true

Vioplot ()//Create a violin chart//

6-Point Chart

Dotchart (x,labels=)

These are basic graphics, and you can also add parameters to make the graphic more expressive, such as headings, legends, and so on, as mentioned in the previous chapter.

Two basic statistical analysis

Some mathematical statistics in this chapter have not been contacted, so let's explain it first.

Covariance is used to measure the overall error of two variables, and variance is a special case of covariance. T test is mainly used for small sample content, the general standard deviation is not known normal distribution data, and its comparison is to verify that the average number of samples represented by the total number is different from the known population. Nonparametric Statistics: Non-parametric assumptions are made on the whole without making any assumptions or making very general assumptions. (not to be continued ...) )

The basic method of R language combat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.