print_grid <- function(grid,compact=T) {
nrows <- nrow(grid)
ncols <- ncol(grid)
if (compact) {
for (i in 1:nrows)
print(paste(toupper(grid[i,]),sep="",collapse=" "))
} else {
for (i in 1:nrows) {
print(paste(rep("+",ncols+1),collapse="-"))
print(paste0("|",paste(toupper(grid[i,]),sep="",collapse="|"),"|"))
}
print(paste(rep("+",ncols+1),collapse="-"))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.