library(roxygen2); library(devtools)
getwd(); dir() # reference
devtools::create("packageNameHere") # creates package directories & files
# (then create function w/ documentation & save in the 'R' directory...)
devtools::document(paste0(normalizePath(getwd()), "\\R")) # run this function to document files in R folder
install("packageNameHere") # only run once
library(packageNameHere) # finally load it
devtools::install_github(repo = "packageNameHere", "githubname") # installs from github
# after package successfully created & documented, should be able to see...
packageNameHere::function()
?function

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.