R study notes

Source: Internet
Author: User

R learning experience notes (codeschool-based Tryr course)

1. vectors. The essence of a vector is a JSON file, but sometimes it can be viewed as an encapsulation. As a JSON file, you can think of it as two rows. The default value is

Vector

{1 :"...",

2 :"...",

3 :"...",

.......}

The general operation is to assign values to the right by default, but you can change the value to the left when necessary.

Vector

{"England ":"...",

"China ":"...",

"Australia ":"...",

.......}

The function used is name.

Barplot and plot are used to visualize (Be careful with the difference between plot (x, y) and plot (y) abline for loading and calculating functions with statistical data.

There are two methods for creating a basic vector: C () and SEQ (), and a: B is a very special one.

As a whole encapsulation, operations on it can be seen as operations on all of its data.

In addition, you must note that functions in R can process unit interactions with data of different lengths. One is another multiple !!

 

2, martrix:

One of the three methods is to create a matrix (value, x, y). The other two are to develop from the vector and use JSON (data). You can directly use matrix (vector, x, y) you can also use integrity to convert a matrix to a dim (vector) <-C (x, y ).

When Matrix [x,] matrix [, y] is equivalent to vector matrix [A: B,], it is a small matrix.

 

R study notes

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.