Created
April 17, 2012 14:30
-
-
Save geofferyzh/2406341 to your computer and use it in GitHub Desktop.
RinAction - R Functions - Math Functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-----------------------------------------------------------------------------# | |
#-----------------------------------------------------------------------------# | |
# R in Action - Advanced Data Management # | |
#-----------------------------------------------------------------------------# | |
#-----------------------------------------------------------------------------# | |
################################################# | |
## Basic Math Functions ## | |
################################################# | |
# abs(x) -- Absolute value | |
# sqrt(x) -- Square root | |
# ceiling(x) -- ceiling(3.475) returns 4. | |
# floor(x) -- floor(3.475) returns 3. | |
# trunc(x) -- trunc(5.99) returns 5. | |
# round(x, digits=n) -- round(3.475, digits=2) returns 3.48. | |
# signif(x, digits=n ) -- signif(3.475, digits=2) returns 3.5. | |
# cos(x),sin(x),tan(x) -- Cosine, sine, and tangent | |
# acos(x),asin(x),atan(x) -- Arc-cosine, arc-sine, and arc-tangent | |
# cosh(x),sinh(x),tanh(x) -- Hyperbolic cosine, sine, and tangent | |
# acosh(x),asinh(x),atanh(x)-- Hyperbolic arc-cosine, arc-sine, and arc-tangent | |
# log(x,base=n) -- Logarithm of x to the base n | |
# log(x) -- Natural logarithm (log(10) returns 2.3026) | |
# log10(x) -- Common logarithm (log10(10) returns 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment