1, histogram analysis of X1, Draw histogram hist ()
2, explore the relationship between the results of various subjects, scatter plot plot function plot ()
3. Table analysis, column-linked function table (), Histogram drawing function Barplot ()
4, pie chart, pie chart plot function pie ()
5, Box tail diagram
The upper and lower lines of the box are 25% and 75% of the sample.
The middle line of the box is the median of the sample
The line that extends up and down is the tail line and the end of the tail line is the highest and lowest value.
Exception value
6, Box line diagram
7. Phase diagram
The value of each observation unit is represented as a graph
Each corner of each graph represents a variable, and the string type is labeled below the graph
The length of the angular line expresses the size of the value
Note: Is 10*10, 100 for students, each student has three subjects, it is said that each student has an astrological figure, big, correct expression of good results
8. Facebook Map
Installing the Aplpack Package
>library (Aplpack)
Other Facebook Images
Installing the Teachingdemos Package
9. Stem and leaf diagram
A 63, a 66, two a 67, a 68 ...
10. QQ Map
Can be used to determine if normal distribution
The slope of the line is the standard deviation and the intercept is the mean value
The closer the scatter is to the straight line, the closer the normal distribution becomes
11. Wiring Diagram
Type= "L": l means line.
12. Density Map
13. R built-in data set
function data () lists the built-in datasets
14. Heat Force diagram
Draw with built-in Mtcars data sets
Convert the Mtcars data frame to a matrix before
15. Scatter chart
(1) Sunflower Scatter chart
Used to overcome the overlap of data points in scatter plots.
Use a "sunflower flower" number of petals in overlapping places to represent the number of overlapping data
(2) Scatter atlas
Iterate through all the variable pairs in the sample to draw a two-dollar graph
Intuitively understand the relationships between all variables
The same effect can be achieved with plot
Use par () to output multiple scatter plots on the same device
Par command is extensive, used to set drawing parameters, help (PAR)
(3) Three-dimensional scatter plot
Install the Scatterplot3d package (located in the library directory where the R language is installed)
16. Harmonic curve
UNISON.R Code (script)
Custom functions
Harmonic curve is very convenient for cluster judgment
>source ("D:\\unison. R ")
>unison (X[2:4])
R language Note 4--graphic analysis