Defines functions RIGHT

Documented in RIGHT

# RIGHT Function from Excel
#' Basic RIGHT function from excel
#' It acts similiarly to Excel's RIGHT function. It takes the string and takes the amount of characters you want to extract from it.
#' @param text from where should it get the characters
#' @param num_chars how many characters should it get?
#' @import base
#' @export
#' @examples
#' RIGHT("Kayakata",4)
#' @return In this example we take "Kayakata" and extract 4 characters from the right handside of the string. Functions will always return character class.

        substr(text,nchar(text) - num_chars + 1, nchar(text))


Try the ExcelFunctionsR package in your browser

Any scripts or data that you put into this service are public.

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.