R/rmExt.R

Defines functions rmExt

rmExt <- function(string) {
  for (i in 1:nchar(string)) {
    strFind <- substr(string, nchar(string) + 1 - i, nchar(string) + 1 - i)
    if (strFind == ".") {
      break
    }
    nChr <- i + 1
  }
  string <- substr(string, 1, nchar(string) - nChr)
  return(string)
}

Try the detrendeR package in your browser

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

detrendeR documentation built on April 16, 2022, 1:06 a.m.