Skip to content

Commit

Permalink
updated pkg info
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce committed Aug 21, 2023
1 parent 2cd298a commit 132c471
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Imports:
bruceR, dplyr, stringr, data.table, purrr, vroom, cli,
ggplot2, ggrepel, corrplot, psych, Rtsne, rgl, qgraph,
rsparse, text2vec, word2vec, fastTextR, text, reticulate
Suggests: wordsalad, sweater
Suggests: wordsalad, sweater, glue
RoxygenNote: 7.2.3
38 changes: 22 additions & 16 deletions R/01-basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
## Version Check
new = FALSE
inst.ver = as.character(packageVersion("PsychWordVec"))
pkg.date = substr(utils::packageDate("PsychWordVec"), 1, 4)
xml = suppressWarnings({
try({
readLines("https://cran.r-project.org/web/packages/PsychWordVec/index.html")
Expand Down Expand Up @@ -45,38 +46,43 @@

## Welcome Message
if(all(loaded)) {
packageStartupMessage(Glue("
\n
<<magenta PsychWordVec (v{inst.ver})>>
<<blue Word Embedding Research Framework for Psychological Science>>
packageStartupMessage(glue::glue_col("
<<magenta Packages also loaded:>>
<<green \u2714 data.table, dplyr, stringr, ggplot2>>
{magenta PsychWordVec (v{inst.ver})}
{blue Word Embedding Research Framework for Psychological Science}
<<magenta Online documentation:>>
<<underline https://psychbruce.github.io/PsychWordVec>>
\n
"))
{magenta Packages also loaded:}
{green \u2714 data.table, dplyr, stringr, ggplot2}
{magenta Online documentation:}
{underline https://psychbruce.github.io/PsychWordVec}
{magenta To use this package in publications, please cite:}
Bao, H.-W.-S. ({pkg.date}). "),
glue::glue_col("{italic PsychWordVec: Word embedding research framework for psychological science}"),
glue::glue_col(" (Version {inst.ver}) [Computer software]. "),
glue::glue_col("{underline https://CRAN.R-project.org/package=PsychWordVec}"),
"\n")
} else {
packageStartupMessage(Glue("
\n
packageStartupMessage(glue::glue_col("
These R packages have not been installed:
{paste(pkgs[loaded==FALSE], collapse=', ')}
Please install them.
\n
"))
}

## Update Info
if(new)
packageStartupMessage(Glue("
\n
packageStartupMessage(glue::glue_col("
NEWS: A new version of PsychWordVec ({cran.ver}) is available ({cran.ymd})!
***** Please update *****
install.packages(\"PsychWordVec\")
\n
"))
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Han-Wu-Shuang (Bruce) Bao 包寒吴霜

## Citation

- Bao, H.-W.-S. (2023). *PsychWordVec: Word embedding research framework for psychological science*. R package version 2023.8. <https://CRAN.R-project.org/package=PsychWordVec>
- Bao, H.-W.-S. (2023). *PsychWordVec: Word embedding research framework for psychological science* (Version 2023.8) [Computer software]. <https://CRAN.R-project.org/package=PsychWordVec>
- Bao, H.-W.-S., Wang, Z.-X., Cheng, X., Su, Z., Yang, Y., Zhang, G.-Y., Wang, B., & Cai, H. (2023). Using word embeddings to investigate human psychology: Methods and applications. *Advances in Psychological Science, 31*(6), 887--904.\
[包寒吴霜, 王梓西, 程曦, 苏展, 杨盈, 张光耀, 王博, 蔡华俭. (2023). 基于词嵌入技术的心理学研究:方法及应用. *心理科学进展, 31*(6), 887--904.]

Expand Down

0 comments on commit 132c471

Please sign in to comment.