R/is_data.R

is.data <- function(data){
  if(!is.data.frame(data)){stop("The data set you entered is not a data frame!")}
  for(i in 2:ncol(data)){
    if(!is.numeric(data[[i]])){stop("One or more columns in your data set are not numeric!")}
  }
}

Try the TeachNet package in your browser

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

TeachNet documentation built on May 2, 2019, 7 a.m.