R study Notes "five" R Language Beginner's Guide--Chapter Two summary

Source: Internet
Author: User

The second chapter learns the R function:

1 sum calculation and sum (x,na.rm=true) calculated in Vector x, which excludes NA elements

2 Median calculates the median to return the number of the middle of a sample data median (x,na.rm=true)

3 Max COMPUTE Max Max (x,na.rm=true)

4 min Compute min min (x,na.rm=true)

5 c () Connect data connection data to form a vector. C (a)

6 Cbind data cbind with column variables (x, y, z)

7 Rbind data rbind with row variables (x, y, z)

8 vectors in vector form with data vector (length=10)

9 matrix combined with data matrices (nrow=10,ncol=4)

Data.frame data Data.frame (X=X,Y=Y,Z=Z) with data frame

A list of data lists (X=X,Y=Y,Z=Z)

Rep cyclic data or Variable rep (c (each=10),

SEQ generates an ordered sequence seq (1,10)

Dim the dimensionality of the computed matrix or cbind-combined data Dim (MyData)

Colnames get the column name of the matrix or cbind combination of data colnames (MyData)

Rownames get the row name of a matrix or cbind-bound data rownames (MyData)

SETWD set working directory SETWD ("E:/r/r-beginer-guide/mycode")

Read.table reading data from an ASCII file read.table (file= "test.txt", Header=true)

Scan ("Test.txt") when reading data from an ASCII file (Big data is fast)

R study Notes "five" R Language Beginner's Guide--Chapter Two summary

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.