Skip to content

Commit 08577cd

Browse files
authored
Merge pull request #142 from PLN-team/fix-note-cran
some fixes for CRAN
2 parents 0b07e70 + 4173e13 commit 08577cd

23 files changed

+45
-44
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Description: The Poisson-lognormal model and variants (Chiquet,
2424
URL: https://pln-team.github.io/PLNmodels/
2525
BugReports: https://github.com/pln-team/PLNmodels/issues
2626
License: GPL (>= 3)
27-
Depends: R (>= 3.6)
27+
Depends: R (>= 4.1.0)
2828
Imports:
2929
cli,
3030
corrplot,

PLNmodels.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: b13e0462-dac8-4d89-a484-68f8674d82d6
23

34
RestoreWorkspace: No
45
SaveWorkspace: No

R/PLNLDAfit-S3methods.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ isPLNLDAfit <- function(Robject) {inherits(Robject, "PLNLDAfit" )}
1616
#' @param nb_axes scalar: the number of axes to be considered when map = "both". The default is min(3,rank).
1717
#' @param axes numeric, the axes to use for the plot when map = "individual" or "variable". Default it c(1,min(rank))
1818
#' @param var_cols a character or factor to define the color associated with the variables. By default, all variables receive the default color of the current palette.
19-
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot2`] object
19+
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot2::ggplot`] object
2020
#' @param main character. A title for the single plot (individual or variable factor map). If NULL (the default), an hopefully appropriate title will be used.
2121
#' @param ... Not used (S3 compatibility).
2222
#'
23-
#' @return displays an individual and/or variable factor maps for the corresponding axes, and/or sends back a [`ggplot2`] or gtable object
23+
#' @return displays an individual and/or variable factor maps for the corresponding axes, and/or sends back a [`ggplot2::ggplot`] or gtable object
2424
#' @examples
2525
#' data(trichoptera)
2626
#' trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)

R/PLNLDAfit-class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ PLNLDAfit <- R6Class(
108108
## Graphical methods -----------------
109109
#' @description Plot the factorial map of the LDA
110110
# @inheritParams plot.PLNLDAfit
111-
#' @return a [`ggplot`] graphic
111+
#' @return a [`ggplot2::ggplot`] graphic
112112
plot_individual_map = function(axes = 1:min(2,self$rank), main = "Individual Factor Map", plot = TRUE) {
113113

114114
.scores <- data.frame(self$scores[,axes, drop = FALSE])
@@ -125,7 +125,7 @@ PLNLDAfit <- R6Class(
125125
#' @description Plot the correlation circle of a specified axis for a [`PLNLDAfit`] object
126126
# @inheritParams plot.PLNLDAfit
127127
#' @param cols a character, factor or numeric to define the color associated with the variables. By default, all variables receive the default color of the current palette.
128-
#' @return a [`ggplot`] graphic
128+
#' @return a [`ggplot2::ggplot`] graphic
129129
plot_correlation_map = function(axes=1:min(2,self$rank), main="Variable Factor Map", cols = "default", plot=TRUE) {
130130

131131
## data frame with correlations between variables and PCs

R/PLNPCAfamily-class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ PLNPCAfamily <- R6Class(
105105
#' @param reverse A logical indicating whether to plot the value of the criteria in the "natural" direction
106106
#' (loglik - penalty) or in the "reverse" direction (-2 loglik + penalty). Default to FALSE, i.e use the natural direction, on
107107
#' the same scale as the log-likelihood.
108-
#' @return A [`ggplot2`] object
108+
#' @return A [`ggplot2::ggplot`] object
109109
plot = function(criteria = c("loglik", "BIC", "ICL"), reverse = FALSE) {
110110
vlines <- sapply(intersect(criteria, c("BIC", "ICL")) , function(crit) self$getBestModel(crit)$rank)
111111
p <- super$plot(criteria, reverse) + xlab("rank") + geom_vline(xintercept = vlines, linetype = "dashed", alpha = 0.25)

R/PLNPCAfit-S3methods.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ isPLNPCAfit <- function(Robject) {inherits(Robject, "PLNPCAfit" )}
1717
#' @param axes numeric, the axes to use for the plot when `map = "individual"` or `map = "variable"`. Default it `c(1,min(rank))`
1818
#' @param ind_cols a character, factor or numeric to define the color associated with the individuals. By default, all variables receive the default color of the current palette.
1919
#' @param var_cols a character, factor or numeric to define the color associated with the variables. By default, all variables receive the default color of the current palette.
20-
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot`] object
20+
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot2::ggplot`] object
2121
#' @param main character. A title for the single plot (individual or variable factor map). If NULL (the default), an hopefully appropriate title will be used.
2222
#' @param ... Not used (S3 compatibility).
2323
#'
24-
#' @return displays an individual and/or variable factor maps for the corresponding axes, and/or sends back a [`ggplot`] or gtable object
24+
#' @return displays an individual and/or variable factor maps for the corresponding axes, and/or sends back a [`ggplot2::ggplot`] or gtable object
2525
#' @examples
2626
#' data(trichoptera)
2727
#' trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)

R/PLNPCAfit-class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ PLNPCAfit <- R6Class(
184184
#' @description Plot the factorial map of the PCA
185185
# @inheritParams plot.PLNPCAfit
186186
#' @param cols a character, factor or numeric to define the color associated with the individuals. By default, all individuals receive the default color of the current palette.
187-
#' @return a [`ggplot`] graphic
187+
#' @return a [`ggplot2::ggplot`] graphic
188188
plot_individual_map = function(axes=1:min(2,self$rank), main = "Individual Factor Map", plot = TRUE, cols = "default") {
189189

190190
.scores <- data.frame(self$scores[,axes, drop = FALSE])
@@ -200,7 +200,7 @@ PLNPCAfit <- R6Class(
200200
#' @description Plot the correlation circle of a specified axis for a [`PLNLDAfit`] object
201201
# @inheritParams plot.PLNPCAfit
202202
#' @param cols a character, factor or numeric to define the color associated with the variables. By default, all variables receive the default color of the current palette.
203-
#' @return a [`ggplot`] graphic
203+
#' @return a [`ggplot2::ggplot`] graphic
204204
plot_correlation_circle = function(axes=1:min(2,self$rank), main="Variable Factor Map", cols = "default", plot=TRUE) {
205205

206206
## data frame with correlations between variables and PCs

R/PLNfamily-class.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ PLNfamily <-
120120
#' @param reverse A logical indicating whether to plot the value of the criteria in the "natural" direction
121121
#' (loglik - penalty) or in the "reverse" direction (-2 loglik + penalty). Default to FALSE, i.e use the natural direction, on
122122
#' the same scale as the log-likelihood.
123-
#' @return A [`ggplot2`] object
123+
#' @return A [`ggplot2::ggplot`] object
124124
plot = function(criteria, reverse) {
125125
stopifnot(!anyNA(self$criteria[criteria]))
126126
dplot <- self$criteria %>%

R/PLNmixturefamily-class.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ PLNmixturefamily <-
222222
#' @param reverse A logical indicating whether to plot the value of the criteria in the "natural" direction
223223
#' (loglik - 0.5 penalty) or in the "reverse" direction (-2 loglik + penalty). Default to FALSE, i.e use the
224224
#' natural direction, on the same scale as the log-likelihood..
225-
#' @return A [`ggplot2`] object
225+
#' @return A [`ggplot2::ggplot`] object
226226
plot = function(criteria = c("loglik", "BIC", "ICL"), reverse = FALSE) {
227227
vlines <- map_int(intersect(criteria, c("BIC", "ICL")), function(crit) self$getBestModel(crit)$k)
228228
p <- super$plot(criteria, reverse) + xlab("# of clusters") + geom_vline(xintercept = vlines, linetype = "dashed", alpha = 0.25)
229229
p
230230
},
231231
#' @description Plot objective value of the optimization problem along the penalty path
232-
#' @return a [`ggplot`] graph
232+
#' @return a [`ggplot2::ggplot`] graph
233233
plot_objective = function() {
234234
objective <- self$models %>% map('optim_par') %>% map('objective') %>% unlist
235235
changes <- self$models %>% map('optim_par') %>% map('outer_iterations') %>% unlist %>% cumsum

R/PLNmixturefit-S3methods.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ isPLNmixturefit <- function(Robject) {inherits(Robject, "PLNmixturefit")}
1717
#' @param x an R6 object with class [`PLNmixturefit`]
1818
#' @param type character for the type of plot, either "pca", for or "matrix". Default is `"pca"`.
1919
#' @param main character. A title for the plot. If NULL (the default), an hopefully appropriate title will be used.
20-
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot`] object
20+
#' @param plot logical. Should the plot be displayed or sent back as [`ggplot2::ggplot`] object
2121
#' @param ... Not used (S3 compatibility).
2222
#'
23-
#' @return a [`ggplot`] graphic
23+
#' @return a [`ggplot2::ggplot`] graphic
2424
#' @examples
2525
#' data(trichoptera)
2626
#' trichoptera <- prepare_data(trichoptera$Abundance, trichoptera$Covariate)

0 commit comments

Comments
 (0)