# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Install Package: 'Ctrl + Shift + B'
# Check Package: 'Ctrl + Shift + E'
# Test Package: 'Ctrl + Shift + T'
#' plus_one()
#'
#'This function adds the number 1 to any number. This function works with negative as well as positive values. The edge cases work for this function.
#' @param x
#'The parameter x accepted by this function is an integer or numeric data type argument.
#' @return
#' The function returns an integer value. The returned value is the number incremented by 1.
#' @export
#'
#' @examples
#' plus_one(2)
plus_one <- function(x) {
x+1
}
#' absolute_value1()
#'
#'This function returns the absolute value of any number passed to it plus the number 1.
#' @param x
#'The parameter x accepted should be of integer or numeric type.
#' @return
#' The returned variable x should also be of integer type and is the absolute value of the number incremented by 1.
#' @export
#'
#' @examples
#'absolute_value1(-1)
absolute_value1 <- function(x) {
abs(x)+1
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.