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