# ONE TIME: CREATE NEW PACKAGE ------------------------------------------------------
# setwd('~')
# getwd()
# usethis::create_package('preds')
# install.packages("roxygen2")
roxygen2::roxygenise()
# ENVIRONMENT PREP --------------------------------------------------------
# install required packages
pkgs_install <- c('earth',
'data.table',
'odbc',
'tidyverse',
'purrr',
# 'xlsx',
'stringr',
'knitr',
'scales',
'devtools',
'roxygen2',
'testthat',
'knitr',
'usethis')
library(psych)
library(QuantPsyc)
library(ltm)
library(Hmisc)
library(ROCR)
library(aod)
library(tidyverse)
library(data.table)
library(lubridate)
library(ggplot2)
library(dplyr)
# add packages to documentation
pkgs_import <- c('earth',
'data.table',
'odbc',
'dplyr',
'tidyr',
'purrr',
'readxl',
'xlsx',
'stringr',
'knitr',
'scales',
'DT',
'here',
'ggplot2')
# library(tidyverse)
# ITERATE TO INSTALL AND DOCUMENT
# sapply(pkgs_import, get_packages)
# pkgs_install %>% purrr::walk(.f = usethis::use_package)
pkgs_import %>% purrr::walk(.f = usethis::use_package, type = "imports")
# pkgs_import %>% purrr::walk(.f = devtools::use_package, type = 'depends')
# DEPENDENCIES ------------------------------------------------------------
usethis::use_pipe()
usethis::use_git()
# usethis::use_github()
# MODEL SAMPLE SUMMARY ----------------------------------------------------
# LOAD DATA ---------------------------------------------------------------
# ADD DATA ----------------------------------------------------------------
x <- sample(1000)
usethis::use_data(x, mtcars, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.