R in Action reading notes (1)--fifth: Advanced data management

Source: Internet
Author: User
Tags mathematical functions natural logarithm rounds

5.2.1 Mathematical Functions

Function

Describe

ABS (x)

Absolute

sqrt (x)

Square root

Ceiling (x)

Smallest integer not less than X

Floor (x)

Largest integer less than x

Trunc (x)

The integer portion of x that is intercepted in the direction of 0

Round (X,digits=n)

Rounds x to a decimal of a specified bit

Signif (x, Digits=n)

Rounds x to the specified number of significant digits

cos (x), sin (x), tan (x)

Cosine, sine, and tangent

ACOs (x), ASIN (x), Atan (x)

Inverse cosine, anyway chord and anyway tangent

Cosh (x), Sinh (x), Tanh (x)

Hyperbolic cosine and hyperbolic sine hyperbolic tangent

Acosh (x), Asinh (x), Atanh (x)

Inverse hyperbolic cosine, inverse hyperbolic sine, and inverse hyperbolic tangent

Log (X,base=n)

N-Base logarithm of X

Log (x)

Natural logarithm

LOG10 (x)

Common logarithm

EXP (x)

exponential function

5.2.2 Statistical functions

Mean (x)

Average

Median (x)

Number of Median

SD (x)

Standard deviation

var (x)

Variance

Mad (x)

Absolute median difference

Quantile (X,probs)

Finding the number of bits

Range (x)

Ask for a domain

SUM (x)

Sum

diff (X, lag=n)

hysteresis differential, lag used to specify several lags

Minx

To find the minimum value

Max (x)

To find the maximum value

Scale (X,center=true,scale=true)

Centering or standardizing on columns for data Objects X

5.2.3 probability function

Beta distribution

Beta

Two item distributions

Binom

Cauchy distribution

Cauchy

(non-center) Chi-square distribution

Chisq

Exponential distribution

Exp

F Distribution

F

Gamma When in cloth

Gamma

Geometric distribution

Geom

Super Geometric distribution

Hyper

Logarithmic normal distribution

Lnorm

Logistic distribution

Logis

Multi-item Distribution

Multinom

Negative two-item distribution

Nbinom

Normal

Norm

Poisson distribution

POIs

Wilcoxon symbol Rank Distribution

Signrank

T distribution

T

Evenly distributed

Unif

Weibull distribution

Weibull

Wilcoxon Rank and distribution

Wilcox

5.2.4 Character processing function

NCHAR (x)

Calculate the number of characters in X

SUBSTR (x, Start, stop)

Extracts or replaces substrings in a character vector

grep (pattern, x, Ignore.case=false,fixed=false)

Search for a pattern in X. If fixed=false, the pattern is a regular expression. If fixed=true, the pattern is a text word Fuschen. The return value is the matching subscript

Sub (pattern, replacement, X,ignore.case=false, Fixed=false)

Search for pattern in X and replace it with text replacement. If fixed=false, the pattern is a regular expression if fixed=true, then the pattern is a text string

Strsplit (x, Split, Fixed=false)

Splits the Yenso in the character vector x at split. If fixed=false, the pattern is a regular expression. If fixed=true, the pattern is a text word Fuschen

Pas seven E (..., sep= "")

Connection Word Fuschen, the separator is Sep

ToUpper (x)

Uppercase Conversion

ToLower (x)

lowercase conversions

5.2.5 Other Utility functions

Length (x)

Length of Object X

Seq (from, to, by)

Generate a sequence

Rep (x, N)

Repeat x N times

Cut (x, N)

The continuous type variable is cut to a factor with n levels

Pretty (x, N)

Create beautiful split points. By selecting the N+1 value of equal spacing, a continuous variable is cut to n intervals.

Cat (..., file = "MyFile", append =false)

Connection '}, the object that the well outputs to the screen or file '}, (if one is declared)

R in Action reading notes (1)--fifth: Advanced data management

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.