Skip to content

Commit

Permalink
v 0.3.0.9000
Browse files Browse the repository at this point in the history
  • Loading branch information
BriceNocenti committed Mar 17, 2024
1 parent 76b2b3c commit 7ecd00e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 37 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.2.3
Date: 2024-01-24 16:40:13 UTC
SHA: dab28d08ba72e4b4dbfc9356d806cdfbcc9f418a
Version: 0.3.0
Date: 2024-03-08 21:46:27 UTC
SHA: 76b2b3c4e5e6a70523b2eccd23c8cd9a76f7ae69
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggfacto
Title: Graphs for Correspondence Analysis
Version: 0.3.0
Version: 0.3.0.9000
Authors@R:
person(given = "Brice",
family = "Nocenti",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ggfacto (development version)

## Bug correction
* `HCPC_tab()` was not working well with numeric variables.


# ggfacto 0.3.0

Expand Down
26 changes: 16 additions & 10 deletions R/geometrical_data_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -5961,14 +5961,17 @@ HCPC_tab <- function(data, row_vars = character(), clust, wt,
pct = dplyr::if_else(pct == "row", "col", "row"),
wt = !!wt,
na = "drop", cleannames = TRUE, color = color,
levels = first_lvs) |>
levels = first_lvs,
...) |>
dplyr::rename_with(~ dplyr::if_else(stringr::str_detect(., "Total_", ), "Total", .)) |>
dplyr::relocate(.data$Total, .after = tidyselect::last_col()) |>
dplyr::mutate(
Total = dplyr::mutate(.data$Total,
wn = dplyr::if_else(is.na(.data$wn), as.double(.data$n), .data$wn)),
Total = vctrs::`field<-`(.data$Total, "pct",
vctrs::field(.data$Total, "wn") /
dplyr::last(vctrs::field(.data$Total, "wn")))
dplyr::last(vctrs::field(.data$Total, "wn"))) |>
tabxplor::set_col_var("Total")
)

col_var <- tabxplor::get_col_var(cah_actives_tab)[tabxplor::get_col_var(cah_actives_tab) != ""]
Expand All @@ -5990,14 +5993,6 @@ HCPC_tab <- function(data, row_vars = character(), clust, wt,
~ stringr::str_replace_all(., " ", unbrk))
)

cah_actives_tab <- cah_actives_tab |>
dplyr::mutate(dplyr::across(
where(tabxplor::is_fmt), ~ dplyr::if_else(.$display == "mean",
true = dplyr::mutate(., diff = 0) |>
tabxplor::as_totrow(),
false = .)
))

n_rows <- dplyr::filter(cah_actives_tab, tabxplor::is_totrow(cah_actives_tab)) |>
dplyr::mutate(
variables = factor("Total"),
Expand All @@ -6008,6 +6003,17 @@ HCPC_tab <- function(data, row_vars = character(), clust, wt,
cah_actives_tab <- dplyr::bind_rows(cah_actives_tab, n_rows) |>
dplyr::group_by(.data$variables)


cah_actives_tab <- cah_actives_tab |>
dplyr::mutate(dplyr::across(
where(tabxplor::is_fmt), ~ dplyr::if_else(.$display == "mean",
true = dplyr::mutate(., diff = 0, digits = 2L) |>
tabxplor::as_totrow(),
false = .)
))



cah_actives_tab
}

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ggca(res.ca,

## Personnalize plots

Step-by-step functions can be used to create a database with all the necessary data, modify it, then use it to draw the plot :
Step-by-step functions can be used to create a database with all the necessary data, modify it, then use it to draw the plot:
``` {r, fig.width = 6, fig.height = 6, results = "hide", message = FALSE}
library(dplyr)
library(ggplot2)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,11 @@ ggca(res.ca,
## Personnalize plots

Step-by-step functions can be used to create a database with all the
necessary data, modify it, then use it to draw the plot :
necessary data, modify it, then use it to draw the plot:

``` r
library(dplyr)
#> Warning: package 'dplyr' was built under R version 4.3.2
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.3.2

plot_data <- ggmca_data(res.mca, tea, sup_vars = "SPC")

Expand Down
26 changes: 7 additions & 19 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## ggfacto new version 0.2.3 : first submission
## ggfacto new version 0.3.0 : first submission

ggfacto wasn't on CRAN since september 2022, because a dependancy also maintained by me,
tabxplor, was not anymore. I will now assure they both stay on CRAN in the future.


## Test environments
Expand All @@ -14,31 +12,21 @@ ggfacto wasn't on CRAN since september 2022, because a dependancy also maintaine
- Ubuntu Linux 22.04.3 LTS, R-release
- Ubuntu Linux 22.04.3 LTS, R-oldrel-1

* https://builder.r-hub.io :
- Windows Server 2022, R-devel, 64 bit
https://builder.r-hub.io/status/ggfacto_0.2.3.tar.gz-796a7101a9db42f59630de9b3e278f49
- Ubuntu Linux 20.04.1 LTS, R-release, GCC
https://builder.r-hub.io/status/ggfacto_0.2.3.tar.gz-def6afe088a6445ca2b5ef806a8ba52d
- Fedora Linux, R-devel, clang, gfortran
https://builder.r-hub.io/status/ggfacto_0.2.3.tar.gz-5149876d6b3742a385b0d4f4dbe6e398

* https://win-builder.r-project.org/uA4df9irRZ02 :
* https://win-builder.r-project.org/Ys22fzQBwi4F :
- Windows x86_64-w64-mingw32 (64-bit), R-devel

## R CMD check results
* local Windows 10:
No ERRORs, no WARNINGs, no NOTEs.

* github Actions :
No ERRORs, no WARNINGs, no NOTEs.

* https://builder.r-hub.io :
No ERRORs, no WARNINGs, 1 NOTE :
New submission/Package was archived on CRAN.
No ERRORs, no WARNINGs, no NOTEs except on :

- Ubuntu Linux 22.04.3 LTS, R-oldrel-1 :
could not install dependency `FactoMineR::`

* https://win-builder.r-project.org :
No ERRORs, no WARNINGs, 1 NOTE :
New submission/Package was archived on CRAN.
No ERRORs, no WARNINGs, no NOTE.


## Downstream dependencies
Expand Down
Binary file modified man/figures/README-unnamed-chunk-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ecd00e

Please sign in to comment.