diff --git a/DESCRIPTION b/DESCRIPTION index 9f7ea78..131e5fe 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,10 +15,7 @@ Description: Constructs basis matrix of B-splines, M-splines, and their integrals (except C-splines) and derivatives of given order by close-form recursive formulas. It also contains a C++ head-only library integrated with Rcpp. - See De Boor (1978) , - Ramsay (1988) , and - Meyer (2008) - for more information about the spline basis. + See Wang and Yan (2021) for details. Imports: Rcpp, stats diff --git a/R/splines2-package.R b/R/splines2-package.R index feee934..9be6eed 100644 --- a/R/splines2-package.R +++ b/R/splines2-package.R @@ -17,7 +17,7 @@ ##' splines2: Regression Spline Functions and Classes ##' -##' This package provides functions to construct basis matrix of +##' This package provides functions to construct basis matrices of ##' \itemize{ ##' \item B-splines ##' \item M-splines @@ -26,20 +26,27 @@ ##' \item periodic M-splines ##' \item natural cubic splines ##' \item generalized Bernstein polynomials -##' \item their integrals (except C-splines) and derivatives of given order by -##' close-form recursive formulas +##' \item along with their integrals (except C-splines) and derivatives +##' of given order by closed-form recursive formulas ##' } ##' ##' In addition to the R interface, it also provides a C++ header-only library -##' integrated with \pkg{Rcpp}, which allows construction of spline basis matrix -##' directly in C++ with the help of \pkg{Rcpp} and \pkg{RcppArmadillo}. So it -##' can also be treated as one of the \pkg{Rcpp*} packages. A toy example -##' package that uses the C++ interface is available at +##' integrated with \pkg{Rcpp}, which allows the construction of spline basis +##' functions directly in C++ with the help of \pkg{Rcpp} and +##' \pkg{RcppArmadillo}. Thus, it can also be treated as one of the \pkg{Rcpp*} +##' packages. A toy example package that uses the C++ interface is available at ##' . ##' -##' It is named after the \pkg{splines} package: -##' "Regression Spline Functions and Classes". The trailing number two is simply -##' "too" (and by no means for the generation two). +##' The package \pkg{splines2} is intended to be a user-friendly supplement to +##' the base package \pkg{splines}. The trailing number two in the package name +##' means "too" (and by no means refers to the generation two). See Wang and +##' Yan (2021) for details and illustrations of how the package can be applied +##' to shape-restricted regression. +##' +##' @references +##' +##' Wang, W., & Yan, J. (2021). Shape-restricted regression splines with R +##' package \pkg{splines2}. \emph{Journal of Data Science}, 19(3), 498--517. ##' ##' @importFrom Rcpp sourceCpp ##' @useDynLib splines2 diff --git a/README.Rmd b/README.Rmd index 63912a1..ece9e3b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -34,11 +34,11 @@ functions to construct basis matrices of - their integrals (except C-splines) and derivatives of given order by closed-form recursive formulas -In addition to the R interface, **splines2** provides a C++ header-only -library integrated with **Rcpp**, which allows the construction of spline basis -functions directly in C++ with the help of **Rcpp** and **RcppArmadillo**. So it -can also be treated as one of the **Rcpp\*** packages. A toy example package -that uses the C++ interface is available [here][example-pkg]. +In addition to the R interface, **splines2** provides a C++ header-only library +integrated with **Rcpp**, which allows the construction of spline basis +functions directly in C++ with the help of **Rcpp** and **RcppArmadillo**. +Thus, it can also be treated as one of the **Rcpp\*** packages. A toy example +package that uses the C++ interface is available [here][example-pkg]. ## Installation of CRAN Version diff --git a/README.md b/README.md index 97ede3c..eac7996 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The R package **splines2** is intended to be a user-friendly ## Features -The package **splines2** (version 0.4.3) provides functions to construct +The package **splines2** (version 0.4.4) provides functions to construct basis matrices of - B-splines @@ -31,7 +31,7 @@ basis matrices of In addition to the R interface, **splines2** provides a C++ header-only library integrated with **Rcpp**, which allows the construction of spline basis functions directly in C++ with the help of **Rcpp** and -**RcppArmadillo**. So it can also be treated as one of the **Rcpp\*** +**RcppArmadillo**. Thus, it can also be treated as one of the **Rcpp\*** packages. A toy example package that uses the C++ interface is available [here](https://github.com/wenjie2wang/example-pkg-Rcpp-splines2). @@ -254,14 +254,14 @@ sessionInfo() [1] splines stats graphics grDevices utils datasets methods base other attached packages: - [1] splines2_0.4.3 microbenchmark_1.4-7 + [1] splines2_0.4.4 microbenchmark_1.4-7 loaded via a namespace (and not attached): [1] Rcpp_1.0.7 mvtnorm_1.1-2 lattice_0.20-44 codetools_0.2-18 ibs_1.4 [6] zoo_1.8-9 digest_0.6.27 MASS_7.3-54 grid_4.1.0 magrittr_2.0.1 [11] evaluate_0.14 rlang_0.4.11 stringi_1.7.3 multcomp_1.4-17 Matrix_1.3-4 - [16] sandwich_3.0-1 rmarkdown_2.9 TH.data_1.0-10 tools_4.1.0 stringr_1.4.0 - [21] survival_3.2-11 xfun_0.24 yaml_2.2.1 compiler_4.1.0 pbs_1.1 + [16] sandwich_3.0-1 rmarkdown_2.10 TH.data_1.0-10 tools_4.1.0 stringr_1.4.0 + [21] survival_3.2-11 xfun_0.25 yaml_2.2.1 compiler_4.1.0 pbs_1.1 [26] htmltools_0.5.1.1 knitr_1.33 diff --git a/man/splines2.Rd b/man/splines2.Rd index af33f31..bd4437c 100644 --- a/man/splines2.Rd +++ b/man/splines2.Rd @@ -5,7 +5,7 @@ \alias{splines2} \title{splines2: Regression Spline Functions and Classes} \description{ -This package provides functions to construct basis matrix of +This package provides functions to construct basis matrices of \itemize{ \item B-splines \item M-splines @@ -14,19 +14,25 @@ This package provides functions to construct basis matrix of \item periodic M-splines \item natural cubic splines \item generalized Bernstein polynomials -\item their integrals (except C-splines) and derivatives of given order by -close-form recursive formulas +\item along with their integrals (except C-splines) and derivatives + of given order by closed-form recursive formulas } } \details{ In addition to the R interface, it also provides a C++ header-only library -integrated with \pkg{Rcpp}, which allows construction of spline basis matrix -directly in C++ with the help of \pkg{Rcpp} and \pkg{RcppArmadillo}. So it -can also be treated as one of the \pkg{Rcpp*} packages. A toy example -package that uses the C++ interface is available at +integrated with \pkg{Rcpp}, which allows the construction of spline basis +functions directly in C++ with the help of \pkg{Rcpp} and +\pkg{RcppArmadillo}. Thus, it can also be treated as one of the \pkg{Rcpp*} +packages. A toy example package that uses the C++ interface is available at . -It is named after the \pkg{splines} package: -"Regression Spline Functions and Classes". The trailing number two is simply -"too" (and by no means for the generation two). +The package \pkg{splines2} is intended to be a user-friendly supplement to +the base package \pkg{splines}. The trailing number two in the package name +means "too" (and by no means refers to the generation two). See Wang and +Yan (2021) for details and illustrations of how the package can be applied +to shape-restricted regression. +} +\references{ +Wang, W., & Yan, J. (2021). Shape-restricted regression splines with R +package \pkg{splines2}. \emph{Journal of Data Science}, 19(3), 498--517. }