R/colID.R

Defines functions colID

Documented in colID

colID <-
function(df){
  if(class(df)!="data.frame"){
    return("Error: input must be a data frame.")
  }
  mat=data.frame(row.names = 1:ncol(df))
  mat[,1]=colnames(df)
  mat[,2]=sapply(df,class)
  colnames(mat)=c("colname","class")
  return(mat)
}

Try the handyplots package in your browser

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

handyplots documentation built on May 2, 2019, 6:12 a.m.