"R language Combat" reading notes--the first chapter R language Introduction

Source: Internet
Author: User
Tags vector font

1, the typical data analysis process can be summed up as a shape:

Note that in the process of model building and validation, data cleansing and modeling may need to be re-established.

2, R language generally use <-as the assignment operator, generally do not use =, the reason is to be verified. can also be used.

3,

Age <-C (1,3,5,2,One,9,3,9, ,3<-C (4.4,5.3,7.2,5.2,8.5,  7.3,6.0,10.4,10.2,6.1) mean (weight) SD (weight) cor (age, Weight) plot (age,weight)

The above section of code is a basic display, where

SD: To find the standard difference function.

Cor: the correlation (linear) coefficient, the correlation matrix or the covariance matrix is obtained.

Here are a few of the functions involved:

Demo: Sample function, followed by a specific function will have an example of display, without parameters show the demo list. In particular, the demo can be used to see a lot of beautiful legends, the demo below the parameters are many, with different functions, the following post-execution demo () to get results.

DemosinchPackage 'Base': error.catching more examples on catching and handling errors is. Things Explore Some properties of R objects and is. FOO () functions. Not forNewbies!recursion Using recursion forAdaptive integrationscoping An illustration of lexical scoping. DemosinchPackage ' graphics ': Hershey Tables of the charactersinchThe Hershey vector fontsjapanese Tables of the Japanese charactersinchThe Hershey vector fontsgraphics A Show of some of R'S GraphicsCapabilitiesimage the image-Like graphics builtins of RPERSP Extended persp () Examplesplotmath Examples of the use of mathe Matics AnnotationdemosinchPackage ' grdevices ': Colors A Show of R's predefined colors ()hclcolors Exploration of HCl () SpacedemosinchPackage ' Stats ': GLM.VR Some glm () examples fromv&R with several PREDICTORSLM.GLM Some linear and generalized linear mod Elling Examples from' an Introduction to statistical modelling'by Annette DobsonNLM Nonlinear Least-squaresusingNLM () smooth ' visualize'Steps in Tukey'S Smoothersuse ' demo ( package=. Packages (all.available =TRUE)) ' To list the demosinchAll *available* packages.

Where the graphics is a package that is used to draw graphics. Try these parameters to see what the effects are:

Hershey: A font, a vector font developed by Hershey, used to render text;

Other reading instructions can be guessed, there are some:

PERSP: Seemingly used to draw three-dimensional graphics;

Plotmath: The corresponding function name of the mathematical formula, which may be useful later;

List of various functions of Is.things:is.XXX;

Recursion: It's a matter of recursion ... ;

Colors:r built-in color, a lot of color;

Hclcolors: Color expansion, more colorful!.

4, about the Help in R, the most used is? + function name, did not expect to have these can be used:

Feeling used? And?? The most convenient, but not how to try example, next time try; In addition, it seems that apropos may be suitable for disorderly search for some related functions; data () is good, so you can see that datasets can now be used, like used Iris, to see The vignette function can view the vignette document in the installed package, first view the document name with vignette (), and then use the vignette (document name) to open the document directly.

5. R Working Space management function:

Where all variables are deleted: RM (list = ls (all = TRUE)). Use the options () command to set some environment variables, such as options (DIGITS=10), which can set the integer representation of R to 10 bits (from: http ://blog.csdn.net/aldenphy/article/details/9405305). The forward slash '/' in the R language represents the directory, such as "e:/r", while the backslash ' \ ' represents the escape character. The SETWD function does not create a nonexistent folder, and you can create a directory with the Dir.create function. It's great to set up a directory every time you start!

The sink function heard for the first time:

R Language Practical study notes--chapter I introduction to R language

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.