Nothing
#' Number of Characters
#'
#' @param x can be number, strings, verctors, dataframe or matrix.
#'
#' @return number of characters in each location
#' @export
#'
#' @examples
#' Nchar("abcd")
#' Nchar(c("abc","gjh"))
#' df = data.frame(
#' a = c(1,12,12.3),
#' b = c("a","ab","abc")
#' )
#' Nchar(df)
Nchar <- function(x){
if (any(is.data.frame(x),is.matrix(x))){
for (i in 1:ncol(x)) {
x[,i]=nchar(as.character(x[,i]))
}
return(x)
}else{
return(nchar(as.character(x)))
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.