Skip to content

Commit

Permalink
Fix CRAN issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
astamm committed Jan 23, 2024
1 parent b4f08bd commit 31b51e3
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^docs$
^pkgdown$
^cran-comments\.md$
^CRAN-SUBMISSION$
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Version: 0.1.0
Authors@R:
person("Aymeric", "Stamm", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-8725-3654"))
Description: It provides subset operator and medoid computation that are fully
parallelized leveraging the 'RcppParallel' package. It also provides
functions for package developers to easily implement their own parallelized
'dist()' function using a custom C++-based distance function.
Description: It provides the subset operator for dist objects and a function to
compute medoid(s) that are fully parallelized leveraging the 'RcppParallel'
package. It also provides functions for package developers to easily
implement their own parallelized dist() function using a custom 'C++'-based
distance function.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand Down
12 changes: 10 additions & 2 deletions R/dev_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
#' @export
#'
#' @examples
#' \dontrun{
#' \donttest{
#' use_distops()
#' }
use_distops <- function() {
if (length(list.files(path = "pathname", pattern = "\\.Rproj$")) == 0) return()
desc_path <- paste0(usethis::proj_path(), "/DESCRIPTION")
if (!fs::file_exists(desc_path)) return()

# Check if backup files are present
backup_files <- fs::dir_ls(
path = usethis::proj_path(),
Expand Down Expand Up @@ -144,10 +148,14 @@ cap <- function(x) {
#' @export
#'
#' @examples
#' \dontrun{
#' \donttest{
#' use_distance("euclidean")
#' }
use_distance <- function(distance_name) {
if (length(list.files(path = "pathname", pattern = "\\.Rproj$")) == 0) return()
desc_path <- paste0(usethis::proj_path(), "/DESCRIPTION")
if (!fs::file_exists(desc_path)) return()

distance_name <- cap(distance_name)
usethis::use_template(
template = "dist.R",
Expand Down
8 changes: 8 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Resubmission

This is a resubmission. In this version I have:

* Modified the `DESCRIPTION` file as requested by CRAN;
* Replaced `dontrun{}` by `donttest{}` in the examples of the `use_distops()`
and `use_distance()` functions.

## Test environments
* local macOS R installation, R 4.3.2
* continuous integration via GH actions:
Expand Down
2 changes: 1 addition & 1 deletion man/distops-package.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/use_distance.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/use_distops.Rd

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

0 comments on commit 31b51e3

Please sign in to comment.