#' @export
equal.dim <- function(x,y) {
UseMethod("equal.dim")
}
#' @export
equal.dim.character <- function(x,y){
return(length(x) == length(y))
}
#' @export
equal.dim.data.frame <- function(x,y){
filas = F
col = F
if (nrow(x) == nrow(y)) filas = T
if (ncol(x) == ncol(y)) col = T
return(filas & col)
}
#' @export
equal.dim.matrix <- function(x,y){
return(equal.dim.data.frame(as.data.frame(x),as.data.frame(y)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.