{math} R# Documentation

math


require(R);

#' the R# math module
imports "math" from "REnv";

the R# math module

the R# math module



.NET clr function exports
floor

Rounding of Numbers

floor takes a single numeric argument x and returns a numeric vector containing the largest integers not greater than the corresponding elements of x.

ceiling

Rounding of Numbers

ceiling takes a single numeric argument x and returns a numeric vector containing the smallest integers not less than the corresponding elements of x.

trunc

Rounding of Numbers

trunc takes a single numeric argument x and returns a numeric vector containing the integers formed by truncating the values in x toward 0.

sign

Sign Function

sign returns a vector with the signs of the corresponding elements of x (the sign of a real number is 1, 0, or -1−1 if the number is positive, zero, or negative, respectively). Note that sign does not operate on complex vectors.

is.nan

Finite, Infinite and NaN Numbers

is.finite and is.infinite return a vector of the same length as x, indicating which elements are finite (not infinite and not missing) or infinite. Inf And -Inf are positive And negative infinity whereas NaN means 'Not a Number’. (These apply to numeric values and real and imaginary parts of complex values but not to values of integer vectors.) Inf and NaN are reserved words in the R language.

fit
is.finite

Finite, Infinite and NaN Numbers

is.finite and is.infinite return a vector of the same length as x, indicating which elements are finite (not infinite and not missing) or infinite.

is.infinite

Finite, Infinite and NaN Numbers

is.finite and is.infinite return a vector of the same length as x, indicating which elements are finite (not infinite and not missing) or infinite.

diff

Lagged Differences

Returns suitably lagged and iterated differences.

round

rounds the values in its first argument to the specified number of decimal places (default 0). See 'Details' about "round to even" when rounding off a 5.

log

computes logarithms, by default natural logarithms, log10 computes common (i.e., base 10) logarithms, and log2 computes binary (i.e., base 2) logarithms. The general form log(x, base) computes logarithms with base base.

log2

Logarithms and Exponentials

log2 computes binary (i.e., base 2) logarithms.

log10

Logarithms and Exponentials

log10 computes common (i.e., base 10) logarithms

sin
cos

evaluate the cosine alpha

prod

Product of Vector Elements prod returns the product of all the values present in its arguments.

sum

Sum of Vector Elements

sum returns the sum of all the values present in its arguments.

pow
sqrt
exp

Logarithms and Exponentials

computes the exponential function.

max
min
mean

Arithmetic Mean

weighted.mean

Weighted Arithmetic Mean

Compute a weighted mean.

median

Median Value

Compute the sample median.

abs

abs(x) computes the absolute value of x

rsd

relative standard deviation

Relative standard deviation is a common formula used in statistics and probability theory to determine a standardized measure of the ratio of the standard deviation to the mean. This formula is useful in various situations including when comparing your own data to other related data and in financial settings such as the stock market. Relative standard deviation, which also may be referred to as RSD or the coefficient of variation, is used to determine if the standard deviation of a set of data is small or large when compared to the mean. In other words, the relative standard deviation can tell you how precise the average of your results is. This formula is most frequently used in chemistry, statistics and other math-related settings but can also be used in the business world when assessing finances and the stock market. The relative standard deviation Of a Set Of data can be depicted As either a percentage Or As a number. The higher the relative standard deviation, the more spread out the results are from the mean Of the data. On the other hand, a lower relative standard deviation means that the measurement Of data Is more precise.

sd

Standard Deviation

This function computes the standard deviation of the values in x. If na.rm is TRUE then missing values are removed before computation proceeds.

pearson

Pearson Correlation Testing in R Programming

Correlation is a statistical measure that indicates how strongly two variables are related. It involves the relationship between multiple variables as well. For instance, if one is interested to know whether there is a relationship between the heights of fathers and sons, a correlation coefficient can be calculated to answer this question. Generally, it lies between -1 and +1. It is a scaled version of covariance and provides the direction and strength of a relationship. this function measure a Parametric Correlation – Pearson correlation(r): It measures a linear dependence between two variables (x and y) is known as a parametric correlation test because it depends on the distribution of the data. Pearson Rank Correlation is a parametric correlation. The Pearson correlation coefficient is probably the most widely used measure for linear relationships between two normal distributed variables and thus often just called "correlation coefficient".

cor.test

Test for Association/Correlation Between Paired Samples

Test for association between paired samples, using one of Pearson's product moment correlation coefficient, Kendall's auτ or Spearman's \rhoρ.

set.seed

set.seed is the recommended way to specify seeds.

rnd

get a random number value between [0,1].

runif

runif generates random deviates.

rnorm

The Normal Distribution

Density, distribution function, quantile function and random generation for the normal distribution with mean equal to mean and standard deviation equal to sd.

sample

Random Samples and Permutations

sample takes a sample of the specified size from the elements of x using either with or without replacement.

shuffle
sample.int
cluster_1D

grouping data input by given numeric tolerance

numeric_tags
var

Correlation, Variance and Covariance (Matrices)

var, cov and cor compute the variance of x and the covariance or correlation of x and y if these are vectors. If x and y are matrices then the covariances (or correlations) between the columns of x and the columns of y are computed.

cor

Correlation, Variance and Covariance (Matrices)

var, cov and cor compute the variance of x and the covariance or correlation of x and y if these are vectors. If x and y are matrices then the covariances (or correlations) between the columns of x and the columns of y are computed.


[Document Index]