R/tuple.R

Defines functions Tuple is.Tuple

Documented in is.Tuple Tuple

Tuple <- function(x, ...){
  if(!is.data.frame(x)){
    stop("Tuples should be a single row dataframe")
  }
  if(nrow(x) != 1){
    stop("Tuples should be a single row dataframe")
  }
  class(x) <- "Tuple"
  x
}

is.Tuple <- function(x){
  ifelse( class(x) == "Tuple", TRUE, FALSE )
}

Try the RStorm package in your browser

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

RStorm documentation built on May 2, 2019, 9:14 a.m.