All commands that you use to use when developing packages...

First time just after creating the project

# Describe your package
fusen::fill_description(
  pkg = here::here(),
  fields = list(
    Title = "ggsmatr",
    Version = 0.1,
    Description = "Create a ggplot - scatter plot based on the coefficients from (Standardised) Major Axis Estimation fit.",
    `Authors@R` = c(
      person("Mario A.", "Sandoval-Molina", email = "sandoval.m@hotmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-8536-6006"))
    )
  )
)
# Define License with use_*_license()
usethis::use_mit_license("Mario Sandoval")

Set extra sources of documentation

# Install a first time
remotes::install_local()
# README
usethis::use_readme_rmd()
# Code of Conduct
usethis::use_code_of_conduct("sandoval.m@hotmail.com")
# NEWS
usethis::use_news_md()

From now, you will need to "inflate" your package at least once to be able to use the following commands. Let's go to your flat template, and come back here later if/when needed.

Package development tools

Use once

# Pipe
usethis::use_pipe()

# package-level documentation
usethis::use_package_doc()

# GitHub
# Add your credentials for GitHub
gitcreds::gitcreds_set()
# Send your project to a new GitHub project
usethis::use_github()

# Set Continuous Integration
# _GitHub
usethis::use_github_action_check_standard()
usethis::use_github_action("pkgdown")
usethis::use_github_action("test-coverage")
# _GitLab
gitlabr::use_gitlab_ci(type = "check-coverage-pkgdown")

# Add new flat template
fusen::add_flat_template("add")

Use everytime needed

# Simulate package installation
pkgload::load_all()

# Generate documentation and deal with dependencies
attachment::att_amend_desc()

# Check the package
devtools::check()

Share the package

# set and try pkgdown documentation website
usethis::use_pkgdown()
pkgdown::build_site(examples= TRUE)

# build the tar.gz with vignettes to share with others
devtools::build(vignettes = TRUE)


mariosandovalmx/ggsmatr documentation built on May 21, 2023, 3:40 p.m.