# sourced from : https://hilaryparker.com/
# =============================================
# SETUP. load required packages
# =============================================
#library("devtools")
#library("roxygen2")
# =============================================
# STEP 1. create directory
# =============================================
#setwd("D:/R")
#create("cats")
# =============================================
# STEP 2 and 3. create function and document it
# =============================================
#' A Cat Function
#'
#' This function allows you to express your love of cats.
#' @param love Do you love cats? Defaults to TRUE.
#' @keywords cats
#' @export
#' @examples
#' cat_function()
cat_function <- function(love=TRUE){
if(love==TRUE){
print("I love cats!")
}
else {
print("I am not a cool person.")
}
}
# =============================================
# STEP 4. Process documentation
# =============================================
#setwd("D:/R/cats")
#document()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.