R/is.rt.R

Defines functions is.rt

is.rt <-
function(x)
{
  if(length(x)) {
    n <- length(x)
    isrt <- rep(FALSE, n)
    for(i in 1L:length(x)) {
      split <- splitme(x[i])
      if(length(split) > 2L) {
        if(resplit(split[1L:2L]) == c("r("))
          isrt[i] <- TRUE
      }
      if(grepl("\"rsps\"", x[i], fixed = TRUE))
        isrt[i] <- TRUE
      if(grepl("\"re\"", x[i], fixed = TRUE))
        isrt[i] <- TRUE
      if(grepl("\"ra\"", x[i], fixed = TRUE))
        isrt[i] <- TRUE
      if(grepl("\"random\"", x[i], fixed = TRUE))
        isrt[i] <- TRUE
    }
  } else isrt <- FALSE

  return(isrt)
}

Try the R2BayesX package in your browser

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

R2BayesX documentation built on Oct. 20, 2023, 3:01 p.m.