# written by Kevin Surya
# see https://r-pkgs.org/index.html
# load the `R` package "devtools" ----
library(devtools)
## make sure that "devtools" is up-to-date
# create the `R` package "drugcandy" ----
## execute in `RStudio`
create_package(path = "drugcandy")
# reload "devtools" ---
library(devtools)
# write .r function files ----
# edit DESCRIPTION ----
# pick a license ----
use_mit_license()
# write README.md ----
# create documentation and generate NAMESPACE ----
document()
# check "drugcandy" ----
check()
#> i Updating drugcandy documentation
#> i Loading drugcandy
#> Writing NAMESPACE
#> Writing NAMESPACE
#> -- Building ------------------------------------------------------------------- drugcandy --
#> Setting env vars:
#> * CFLAGS : -Wall -pedantic -fdiagnostics-color=always
#> * CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
#> * CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
#> * CXX14FLAGS: -Wall -pedantic -fdiagnostics-color=always
#> * CXX17FLAGS: -Wall -pedantic -fdiagnostics-color=always
#> * CXX20FLAGS: -Wall -pedantic -fdiagnostics-color=always
#> --------------------------------------------------------------------------------------------
#> √ checking for file 'C:\Users\sadik\Documents\GitHub\drugcandy/DESCRIPTION' ...
#> - preparing 'drugcandy': (1.1s)
#> √ checking DESCRIPTION meta-information ...
#> - checking for LF line-endings in source and make files and shell scripts
#> - checking for empty or unneeded directories
#> - building 'drugcandy_1.0.0.tar.gz'
#>
#> -- Checking ------------------------------------------------------------------- drugcandy --
#> Setting env vars:
#> * _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
#> * _R_CHECK_CRAN_INCOMING_ : FALSE
#> * _R_CHECK_FORCE_SUGGESTS_ : FALSE
#> * NOT_CRAN : true
#> -- R CMD check -----------------------------------------------------------------------------
#> - using log directory 'C:/Users/sadik/AppData/Local/Temp/RtmpGEEgw5/drugcandy.Rcheck'
#> - using R version 4.1.2 (2021-11-01)
#> - using platform: x86_64-w64-mingw32 (64-bit)
#> - using session charset: ISO8859-1
#> - using options '--no-manual --as-cran'
#> √ checking for file 'drugcandy/DESCRIPTION' ...
#> - this is package 'drugcandy' version '1.0.0'
#> - package encoding: UTF-8
#> √ checking package namespace information ...
#> √ checking package dependencies (2.2s)
#> √ checking if this is a source package
#> √ checking if there is a namespace
#> √ checking for executable files (585ms)
#> √ checking for hidden files and directories ...
#> √ checking for portable file names ...
#> √ checking serialization versions
#> √ checking whether package 'drugcandy' can be installed (8.6s)
#> √ checking installed package size ...
#> √ checking package directory
#> √ checking for future file timestamps ...
#> √ checking DESCRIPTION meta-information (363ms)
#> √ checking top-level files
#> √ checking for left-over files ...
#> √ checking index information
#> √ checking package subdirectories ...
#> √ checking R files for non-ASCII characters ...
#> √ checking R files for syntax errors ...
#> √ checking whether the package can be loaded (2.1s)
#> √ checking whether the package can be loaded with stated dependencies (2.1s)
#> √ checking whether the package can be unloaded cleanly (2.2s)
#> √ checking whether the namespace can be loaded with stated dependencies (2.1s)
#> √ checking whether the namespace can be unloaded cleanly (2.2s)
#> √ checking dependencies in R code (2.1s)
#> √ checking S3 generic/method consistency (3.1s)
#> √ checking replacement functions (2.1s)
#> √ checking foreign function calls (2.1s)
#> √ checking R code for possible problems (10.3s)
#> √ checking Rd files ...
#> √ checking Rd metadata ...
#> √ checking Rd line widths ...
#> √ checking Rd cross-references ...
#> √ checking for missing documentation entries (2s)
#> √ checking for code/documentation mismatches (6.1s)
#> √ checking Rd \usage sections (3.4s)
#> √ checking Rd contents ...
#> √ checking for unstated dependencies in examples ...
#> - checking examples ... NONE
#> √ checking for non-standard things in the check directory
#> √ checking for detritus in the temp directory
#>
#>
#> -- R CMD check results ------------------------------------------------ drugcandy 1.0.0 ----
#> Duration: 1m 0.2s
#>
#> 0 errors √ | 0 warnings √ | 0 notes √
# clean and store external data ----
# create vignette ----
# render "drugcandy" as a git repo ----
use_git()
# create a new GitHub repo with the same name as the package ----
# synchronize the local git repo with the GitHub repo ----
#> git remote add origin git@github.com:hadley/r-pkgs.git
#> git push -u origin master
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.