Skip to content

Commit

Permalink
[2021.12]
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce committed Aug 7, 2023
1 parent d1c9ef5 commit f254c82
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 35 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Description:
License: GPL-3
Encoding: UTF-8
LazyData: true
URL: https://github.com/psychbruce/ChineseNames
URL: https://psychbruce.github.io/ChineseNames/
BugReports: https://github.com/psychbruce/ChineseNames/issues
Depends: R (>= 4.0.0)
Imports: bruceR, data.table
Suggests: babynames, car, dplyr
Suggests: babynames, car, dplyr, glue
RoxygenNote: 7.2.3
10 changes: 9 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
**If you are viewing this file on CRAN, please check [latest news on GitHub](https://github.com/psychbruce/ChineseNames/blob/master/NEWS.md) where the formatting is also better.**
**Please check the [latest news (change log)](https://psychbruce.github.io/bruceR/news/index.html) and keep this package updated.**

# ChineseNames 2021.12

- Now use "YYYY.M" as package version number.

# ChineseNames 1.1.1 (Nov 2021)

- Added new reference ([Bao et al., 2021](https://doi.org/10.3389/fpsyg.2021.731244)).

# ChineseNames 1.1.0 (June 2021)

Expand Down
39 changes: 25 additions & 14 deletions R/ChineseNames.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,35 @@
#' Bao, H.-W.-S., Cai, H., Jing, Y., & Wang, J. (2021).
#' Novel evidence for the increasing prevalence of unique names in China:
#' A reply to Ogihara. \emph{Frontiers in Psychology, 12}, 731244.
#' \url{https://www.frontiersin.org/articles/10.3389/fpsyg.2021.731244/full}
#' \doi{10.3389/fpsyg.2021.731244}
#'
#' @docType package
#' @name ChineseNames
NULL


.onAttach = function(libname, pkgname) {
packageStartupMessage(
"\nTo use the `ChineseNames` package in publications, please cite:\n\n",
"Bao, H.-W.-S. (2021). ",
"ChineseNames: Chinese Name Database 1930-2008. ",
"R package version 2021.12. ",
"https://CRAN.R-project.org/package=ChineseNames\n\n",
"Other references:\n\n",
"Bao, H.-W.-S., Cai, H., Jing, Y., & Wang, J. (2021). ",
"Novel evidence for the increasing prevalence of unique names in China: ",
"A reply to Ogihara. Frontiers in Psychology, 12, 731244.\n")
inst.ver = as.character(utils::packageVersion("ChineseNames"))
packageStartupMessage(glue::glue_col("
{magenta ChineseNames (v{inst.ver})}
{blue Chinese Name Database 1930-2008}
{magenta Online documentation:}
{underline https://psychbruce.github.io/ChineseNames}
{magenta To use this package in publications, please cite:}
"),
"\n",
"Bao, H.-W.-S. (2021). ",
"ChineseNames: Chinese Name Database 1930-2008. ",
"R package version 2021.12. ",
"https://CRAN.R-project.org/package=ChineseNames\n",
"\n",
"Bao, H.-W.-S., Cai, H., Jing, Y., & Wang, J. (2021). ",
"Novel evidence for the increasing prevalence of unique names in China: ",
"A reply to Ogihara. Frontiers in Psychology, 12, 731244.\n")
}


Expand Down Expand Up @@ -207,7 +218,7 @@ NULL
#' Bao, H.-W.-S., Cai, H., Jing, Y., & Wang, J. (2021).
#' Novel evidence for the increasing prevalence of unique names in China:
#' A reply to Ogihara. \emph{Frontiers in Psychology, 12}, 731244.
#' \url{https://www.frontiersin.org/articles/10.3389/fpsyg.2021.731244/full}
#' \doi{10.3389/fpsyg.2021.731244}
#'
#' @examples
#' ## Prepare ##
Expand All @@ -219,13 +230,13 @@ NULL
#' demodata = data.frame(name=paste0(sn, gn),
#' birth=c(1960:1965, 2000:2005,
#' 1960:1965, 2000:2005))
#' # View(demodata)
#' demodata
#'
#' ## Compute ##
#' newdata = compute_name_index(demodata,
#' var.fullname="name",
#' var.birthyear="birth")
#' # View(newdata)
#' newdata
#'
#' @import data.table
#' @importFrom bruceR dtime Print MEAN LOOKUP
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ A database of Chinese surnames and Chinese given names (1930-2008). This databas

Han-Wu-Shuang (Bruce) Bao 包寒吴霜

Email: [baohws\@foxmail.com](mailto:baohws@foxmail.com)
📬 [baohws\@foxmail.com](mailto:baohws@foxmail.com)

Homepage: [psychbruce.github.io](https://psychbruce.github.io)
📋 [psychbruce.github.io](https://psychbruce.github.io)

## Citation

- Bao, H.-W.-S. (2021). ChineseNames: Chinese Name Database 1930-2008. R package version 2021.12. <https://CRAN.R-project.org/package=ChineseNames>
- Bao, H.-W.-S. (2021). *ChineseNames: Chinese Name Database 1930-2008*. R package version 2021.12. <https://CRAN.R-project.org/package=ChineseNames>
- Bao, H.-W.-S., Cai, H., Jing, Y., & Wang, J. (2021). Novel evidence for the increasing prevalence of unique names in China: A reply to Ogihara. *Frontiers in Psychology, 12*, 731244. <https://www.frontiersin.org/articles/10.3389/fpsyg.2021.731244/full>

## Install
Expand Down
4 changes: 2 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ template:
bootstrap: 5
bootswatch: simplex
bslib:
heading_font: {google: "Source Sans Pro"}
base_font: {google: "Source Sans Pro"}
heading_font: {google: "Roboto"}
base_font: {google: "Roboto"}
18 changes: 9 additions & 9 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## News

In this version (1.1.1), I have fixed a bug related to an update of `bruceR` (thanks to Prof. Brian Ripley) and modified citation information.

Minor changes.

## Test environments

* Windows 10 (local installation), R 4.1.2
* Mac OS 11.2 (user installation), R 4.0.4
* Ubuntu 16.04 (on travis-ci.com), R 4.0.2
- Windows 11 (local installation), R 4.3.0
- Mac OS 13.3 (check_mac_release), R 4.3.0

## Package check results

## R CMD check results
passing `devtools::check_win_devel()`

There were no ERRORs, WARNINGs, or NOTEs.
## R CMD check results

passing (0 errors | 0 warnings | 0 notes)

## Downstream dependencies
## Reverse dependencies

No reverse dependency currently.
No reverse dependency.
2 changes: 1 addition & 1 deletion man/ChineseNames.Rd

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

6 changes: 3 additions & 3 deletions man/compute_name_index.Rd

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

0 comments on commit f254c82

Please sign in to comment.