Showing posts with label mathematical- statistical- probability and character functions-R. Show all posts
Showing posts with label mathematical- statistical- probability and character functions-R. Show all posts

Tuesday, August 20, 2019

How to find mathematical and character functions-R

Mathematical and character functions-R

mathematics,character,functions,mathmatical operations in r,tab character,mbti cognitive functions,escape character,java escape characters,escape characters,mbti functions,superscript characters,newline character,r functions,myers briggs functions,jungian cognitive functions,mathematics (field of study),myers briggs cognitive functions,rstudio,programming,statistics,r (programming language),analytics,tutorials,variables,data types

Absolute value
> abs(-4)
[1] 4
Square root
> sqrt(25)
[1] 5
Smallest integer not less than x
> ceiling(3.475)
[1] 4
Largest integer not greater than x
> floor(3.475)
[1] 3
Integer formed by truncating values in x toward 0
> trunc(5.99)
[1] 5
> round(3.475, digits=2) 
[1] 3.48
 Round x to the specified number of significant digits
> signif(3.475, digits=2)
[1] 3.5
 Cosine, sine, and tangent
> cos(2)
[1] -0.4161468
 Arc-cosine, arc-sine, and arc-tangent
> acos(-0.416)
[1] 1.999839
Hyperbolic cosine, sine, and tangent
> sinh(2)
[1] 3.62686
 Hyperbolic arc-cosine, arc-sine, and arc-tangent
> asinh(3.627)
[1] 2.000037
Logarithm of x to the base n for convenience
log(x) is the natural logarithm
> log10(x) is the common logarithm.
> log(10)
[1] 2.302585
> log10(10)
[1] 1
Exponential function
> exp(2.3026)
[1] 10.00015

Black-Scholes formula-R

 Black-Scholes formula-R > BlackScholes <- function(TypeFlag = c("c", "p"), S, X, Time, r, b, sigma) { TypeFla...