Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: elgarteo/cnum
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.4
Choose a base ref
...
head repository: elgarteo/cnum
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 11, 2025

  1. Copy the full SHA
    73ae5b8 View commit details

Commits on Jan 12, 2025

  1. Copy the full SHA
    720d29f View commit details
  2. Version 0.1.5

    elgarteo committed Jan 12, 2025
    Copy the full SHA
    f774c9c View commit details
Showing with 14 additions and 8 deletions.
  1. +1 −1 DESCRIPTION
  2. +6 −0 NEWS.md
  3. +1 −1 R/num2c-utils.R
  4. +3 −3 R/num2c.R
  5. +3 −3 man/conversion.Rd
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: cnum
Type: Package
Title: Chinese Numerals Processing
Version: 0.1.4
Version: 0.1.5
Authors@R: person("Elgar", "Teo", email = "elgarteo@connect.hku.hk",
role = c("aut", "cre"))
Maintainer: Elgar Teo <elgarteo@connect.hku.hk>
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# cnum 0.1.5

* Fixed bug in duplicated unit character output from `num2c()` in single scale character mode

* Fixed buffer overflow issue when executing `num2c()` examples in gcc-ASAN check

# cnum 0.1.4

* Fixed documentation formatting issue during CRAN check
2 changes: 1 addition & 1 deletion R/num2c-utils.R
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ integer2c_single <- function(number, conv_t) {
new_number <- number / 10^(nearest_scale - 1)

if (new_number %% 1 == 0) {
new_number <- format(number, scientific = FALSE)
new_number <- format(new_number, scientific = FALSE)
paste0(integer2c(new_number, conv_t), scale_t$c[scale_t$n == nearest_scale])
} else {
n <- nchar(gsub("^.*\\.", "", new_number)) # count decimal places
6 changes: 3 additions & 3 deletions R/num2c.R
Original file line number Diff line number Diff line change
@@ -7,9 +7,9 @@
#' num2c(-6)
#' num2c(3.14)
#' num2c(721, literal = TRUE)
#' num2c(1.45e10, financial = TRUE)
#' num2c(6.85e10, lang = "sc", mode = "casualPRC")
#' num2c(1.5e9, mode = "SIprefix", single = TRUE)
#' num2c(1.45e4, financial = TRUE)
#' num2c(6.85e4, lang = "sc", mode = "casualPRC")
#' num2c(1.5e4, mode = "SIprefix", single = TRUE)
#'
#' @export
#'
6 changes: 3 additions & 3 deletions man/conversion.Rd

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