Skip to content

Commit

Permalink
Merge pull request #22 from psychelzh/20-release-cpmr-010
Browse files Browse the repository at this point in the history
  • Loading branch information
psychelzh authored Oct 6, 2024
2 parents 0910d47 + 9853375 commit 013837d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cpmr
Title: Connectome Predictive Modelling in R
Version: 0.0.9.9000
Version: 0.1.0
Authors@R:
person("Liang", "Zhang", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9041-1150"))
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# cpmr (development version)
# cpmr 0.1.0

## New features

* Added `summary()` method to summarize the results of the CPM analysis.
* Added `tidy()` method to tidy the results of the CPM analysis.
* Added `summary()` method to summarize the results of the CPM analysis (#8).
* Added `tidy()` method to tidy the results of the CPM analysis (#10).
* Support `na_action` argument in `cpm()` function to handle missing values in the input data (#2).

## Enhancements
Expand Down
8 changes: 4 additions & 4 deletions R/cpm.R
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ cpm <- function(conmat, behav, ...,
exclude = Reduce(
function(x, y) intersect(x, y),
list(
which(complete.cases(conmat)),
which(complete.cases(behav)),
which(stats::complete.cases(conmat)),
which(stats::complete.cases(behav)),
if (!is.null(confounds)) {
which(complete.cases(confounds))
which(stats::complete.cases(confounds))
} else {
seq_along(behav)
}
Expand Down Expand Up @@ -225,7 +225,7 @@ print.cpm <- function(x, ...) {
cat(" Call: ")
print(x$call)
cat(sprintf(" Number of observations: %d\n", length(x$real)))
cat(sprintf(" Complete cases: %d\n", sum(complete.cases(x$pred))))
cat(sprintf(" Complete cases: %d\n", sum(stats::complete.cases(x$pred))))
if (!is.null(x$edges)) {
cat(sprintf(" Number of edges: %d\n", dim(x$edges)[1]))
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/tidy.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ generics::tidy
#' @param x A `cpm` object.
#' @param ... Additional arguments passed to `summary()`.
#' @param component A character vector indicating the component to tidy.
#' @return A [tibble][tibble-package] with columns storing parameters of the
#' @return A [tibble][tibble::tibble-package] with columns storing parameters of the
#' [cpm()] object and further columns depending on the `component` argument:
#'
#' For `component = "performance"`:
Expand Down
14 changes: 1 addition & 13 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.

The NOTE is as follows:

```
❯ checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''
```

As noted in [this issue](https://github.com/r-hub/rhub/issues/560), this is a known issue with the `rhub` package and can be safely ignored.
Use `devtools::check_win_devel()` shows no errors, warnings and notes.
2 changes: 1 addition & 1 deletion man/tidy.cpm.Rd

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

0 comments on commit 013837d

Please sign in to comment.