User Defined Functions in R Part I

User-defined functions in R Part I

In this tutorial, you will learn about what is user-defined function in R and how to create user-defined function in R. You will also learn about how the function is evaluated in R. What are functions in R? For every programming language, functions are the building blocks. Basically, functions are used to incorporate set of …

Read more

tapply function in R with examples

tapply function in R

In this tutorial, we will discuss about tapply() function in R with some examples. tapply() function is available in base R package. The tapply() function in R The tapply() function is very useful to aggregate the data. That is tapply() function allows us to create a group summaries based on factor levels. The general syntax …

Read more

Built-in Statistical Functions in R

Built-in statistical functions in R

In this tutorial, you will learn about some built-in statistical functions in R and how to use them. Built-in Statistical Functions in R Some of the commonly used built-in statistical function in R are listed below: Function Operation Performed sum(x) Sum of elements of x prod(x) Product of elements of x mean(x) Mean of x …

Read more

Built-in Character Functions in R

Built-in character functions in R

Built-in Character Functions in R In earlier tutorials we have seen that how to create character vector in R which contains character strings. To manipulate strings or character vectors, R has many built in functions for characters. Function Description nchar() Get the length of string toupper(x) Convert to Upper case tolower(x) Convert to Lower case …

Read more

sapply Function in R with Examples

sapply function in R

In this tutorial, we will discuss about sapply() function in R with some examples. sapply() function is available in base R package. sapply() function in R The sapply() function takes a vector, list or data frame, an index and a function (built-in or user-defined function) as inputs. The sapply() function is similar to lapply() function, …

Read more

lapply Function in R with Examples

lapply function in R

In this tutorial, we will discuss about lapply() function in R with some examples. lapply() function is available in base R package. lapply() function in R The lapply() function is the most popular function in R. The lapply() function takes a vector, list or data frame, a function (built-in or user-defined) as inputs and additional …

Read more

apply Function in R with Examples

apply function in R

In this tutorial, we will discuss about apply() function in R with some examples. The apply() function is available in base R package. apply() function in R The apply() function is the most popular function in R. The apply() function takes a matrix or array, an index and a function (built-in or user-defined) as inputs. …

Read more

Built-in Trigonometric functions in R

Built-in trigonometric functions in R

Trigonometric functions are the part of built-in mathematical functions. All these functions are vectorised. In this tutorial you will learn some built-in trigonometric functions in R and how to use these trigonometric functions in R. Built-in Trigonometric functions Commonly used trigonometric functions in R are listed below: Function Operation Performed sin(x) sine value of x …

Read more

Built-in Special Mathematical Functions in R

Built-in special math functions in R

Along with other usual built-in mathematical functions, R programming language provides some special built-in mathematical functions. All these functions are vectorised. In this tutorial you will learn some built-in special mathematical functions in R and how to use these special mathematical functions in R. Built-in Special Mathematical Functions R provides some special mathematical functions related …

Read more