R/df.R

#' Return data types
#'
#' @param x object
#'
#' @return data types
#' @export
#'
dtypes <- function (x) {
	if( !is.null(attr(x, 'spec')) ){
		attr(x, "spec")
	} else {
		#utils::str(x, give.attr=FALSE, comp.str='', give.length=FALSE)
		cbind('dtype'=sapply(x, typeof))
	}
}
stackcon/rngt documentation built on June 17, 2022, 5:29 p.m.