Call existing R code through functions

When you write code, functions are your best friends. They can make hard things very easy or provide new functionality in a nice way. Through functions you gain access to all the powerful features R has to offer.

  • Call functions with function names and round brackets
  • Use basic mathematical functions on vectors
  • Customize functions through parameters
  • Create number sequences using seq()
  • Create random numbers using runif()
  • Sample vectors using sample()
abs(___)
sqrt(___)
seq(___)
runif(___)
View Interactive Version
Call existing R code through functions