Skip to content

Commit

Permalink
begin Prepare_for_CRAN checks
Browse files Browse the repository at this point in the history
  • Loading branch information
friendly committed Sep 27, 2024
1 parent a432040 commit 06e82c7
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/latexMatrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
#' \item{\code{"Bmatrix"}}{uses braces: \code{"{", "}"}}
#' \item{\code{"vmatrix"}}{uses vertical bars: \code{"|", "|"}}
#' \item{\code{"Vmatrix"}}{uses double vertical bars: \code{"||", "||"}}
#' \item{\code{"matrix"}}{generates a plain matrix without delimeters}
#' \item{\code{"matrix"}}{generates a plain matrix without delimiters}
#' \item{\code{"smallmatrix"}}{same as \code{"matrix"}, but for in-line use}
#' }
#' Small matrix definitions from the \code{mathtools} LaTeX package are also possible for in-line use (e.g., \code{"psmallmatrix"}).
Expand Down
2 changes: 1 addition & 1 deletion R/latexMatrixOperations.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#' element of the adjoint matrix is divided by the determinant
#' @param as.numeric if \code{TRUE} (the default) and the matrices to be multiplied, added, etc., can be
#' coerced to numeric, matrix multiplication, addition, etc., is performed numerically;
#' supercedes \code{simplify}
#' supersedes \code{simplify}
#' @param power to raise a square matrix to this power, an integer \code{>= -1}.
#' @param ... for \code{matmult()} and \code{sum()} zero or more
#' \code{"latexMatrix"} objects; otherwise arguments to be passed down
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[![R-universe](https://friendly.r-universe.dev/badges/matlib)](https://friendly.r-universe.dev)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/matlib)](https://cran.r-project.org/package=matlib)
[![downloads](http://cranlogs.r-pkg.org/badges/matlib)](https://cran.r-project.org/package=matlib)

<!-- [![Dependencies](https://tinyverse.netlify.com/badge/matlib)](https://cran.r-project.org/package=matlib) -->
[![Travis-CI Build Status](https://travis-ci.org/friendly/matlib.svg?branch=master)](https://travis-ci.org/friendly/matlib)

<!-- badges: end -->

Expand Down
72 changes: 72 additions & 0 deletions dev/Prepare_for_CRAN.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Prepare for CRAN ----

# Update dependencies in DESCRIPTION
# install.packages('attachment', repos = 'https://thinkr-open.r-universe.dev')
attachment::att_amend_desc()

# Run tests and examples
devtools::test()
devtools::run_examples()
# autotest::autotest_package(test = TRUE)

# Check package as CRAN
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))

# Re-build documentation, in case any mods made to .R files
devtools::document()

# Check content
# install.packages('checkhelper', repos = 'https://thinkr-open.r-universe.dev')
checkhelper::find_missing_tags()
# _Check that you left the house clean after the check, examples and tests
all_files_remaining <- checkhelper::check_clean_userspace()
all_files_remaining

# Check spelling
# usethis::use_spell_check()
spelling::spell_check_package()

# Check URL are correct
# install.packages('urlchecker', repos = 'https://r-lib.r-universe.dev')
urlchecker::url_check()
urlchecker::url_update()

# check on other distributions
# _rhub
devtools::check_rhub()
rhub::check_on_windows(check_args = "--force-multiarch")
rhub::check_on_solaris()
# _win devel CRAN
devtools::check_win_devel()
# _macos CRAN
devtools::check_mac_release()

# Check reverse dependencies
# remotes::install_github("r-lib/revdepcheck")
install.packages('revdepcheck', repos = 'https://r-lib.r-universe.dev')
usethis::use_git_ignore("revdep/")
usethis::use_build_ignore("revdep/")

devtools::revdep()
library(revdepcheck)
# In another session
id <- rstudioapi::terminalExecute("Rscript -e 'revdepcheck::revdep_check(num_workers = 4)'")
rstudioapi::terminalKill(id)
# See outputs
revdep_details(revdep = "pkg")
revdep_summary() # table of results by package
revdep_report() # in revdep/
# Clean up when on CRAN
revdep_reset()

# Update NEWS
# Bump version manually and add list of changes

# Add comments for CRAN
usethis::use_cran_comments(open = rlang::is_interactive())

# Upgrade version number
usethis::use_version(which = c("patch", "minor", "major", "dev")[1])

# Verify you're ready for release, and release
devtools::release()
Binary file removed dev/border-mat.png
Binary file not shown.
5 changes: 5 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ bmatrix
buglet
carData
Cheung
cdot
cdots
cofactor
Cofactor
cofactors
Expand All @@ -25,6 +27,7 @@ Eigen
eigenstructure
eigenvalues
Eqn
eqn
ERO
EROs
gaussianElimination
Expand Down Expand Up @@ -72,6 +75,7 @@ rgl
rglwidget
Rmarkdown
Rightarrow
RStudio
Savov
Scazzocchio
showEqn
Expand All @@ -87,6 +91,7 @@ travis
underdetermined
useR
Vandermode
vdots
vectorize
Vectorize
webshot
Expand Down
2 changes: 1 addition & 1 deletion man/latexMatrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/latexMatrixOperations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/latex-equations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ There are already some tools available in R for producing LaTeX output:
* The [`mathpix`](https://cran.r-project.org/package=mathpix) package
can take an image of a an equation or formula and produce the LaTeX code which should generate that image.
* The [`texPreview`](https://cran.r-project.org/package=texPreview) package
compiles snippets of LaTeX directly into images from the R console to view in the RStudio viewer pane, Shiny apps and RMarkdown documents.
compiles snippets of LaTeX directly into images from the R console to view in the RStudio viewer pane, Shiny apps and Rmarkdown documents.

See [Tools for making latex tables in R](https://stackoverflow.com/questions/5465314/tools-for-making-latex-tables-in-r)
for a more comprehensive list
Expand Down

0 comments on commit 06e82c7

Please sign in to comment.