#' Get sufffix of input file.
#'
#' @param file_name A string for file names.
#'
#' @return Return file suffix.
#' @export
#' @examples
#' get_file_suffix("myfile.txt")
get_file_suffix <- function(file_name){
# Paser file name and get file suffix.
# txt or csv
if(grepl('.txt', file_name)){
return('txt')
}else{
return('csv')
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.