Tutorial for pinyin: Installation and Quick Start

  • What Will I Learn?
    • What the R ‘pinyin’ package can do for you
    • How to Set up the environment which ‘pinyin’ requires.
    • How to use the main functions of ‘pinyin’
  • Requirements
    • Windows/mac/Linux OS
    • R environment
    • R pinyin package
    • RStudio IDE (recommended)
  • Difficulty
    • Basic

Continue reading

sinx: R fortunes in Chinese

One of the funniest things I found when I (as a Windows user) leant Ubuntu was that there is a command fortune, which prints a random/pseudorandom message from a database of quotations. It is said that this old feature has been available since 1970s. It was a pity that this feature was unavailable in boring Windows OS, until the R community developed in 2012 a package called 'fortunes,' which displays funny messages taken from the talks or communications in the R community. It supports external database as well. Unfortunately, it does not support Chinese texts, probably because (1) the 'fortunes' package cannot read multibyte characters such as Chinese, and (2) no one contributes Chinese database of fortunes.

It is a great loss, as fortunes actually come from Chinese restaurants.

Continue reading

rosr News: a Shiny GUI and RStudio addin for choosing and creating sub-projects

'rosr' is an R package for creating reproducible academic project with integrated various academic elements, including data, bibliography, codes, images, manuscripts, dissertations, slides and so on. These elements are well connected so that they can be easily synchronized and updated. Users don't have to repeat copying and pasting their results and figures from time to time. It will be easy for the scientific researchers to use, even if they are R beginners, or even non-R-users.

Continue reading

rosr: Create academic R markdown projects for open science and reproducible research

Weeks ago, I gave a short training course at one of the top institutes in the world. The course was called 'R, Open Science and Reproducible Research', abbreviated as ROSS. It was given to the academic researchers who were interested in R and reproducible research. The R markdown family, including 'rticles', 'bookdown', 'xaringan' etc., were introduced. The audience were excited in the course. They felt, however, confused after the course by using these packages on their own work. It is not easy to connect their own work with the R Markdown ecosystem.

Continue reading

[New Features on beginr] Automatically generate a self-contained package

Most R beginners think that developing an R package is a mission impossible. It is not true. With the new function packr() , users can create a user-defined useful R packages easily. They can specify in packr()a group of packages (e.g. foo_1, foo_2, foo_x) which they often use and the new package name, say foobar, then a new package called foobar will be generated.

Continue reading

rmd: Easily Install, Load and Explore the R Markdown Family

Since 'rmarkdown' and 'knitr', more and more members (rticles, bookdown, mindr...) have been joining the R Markdown family. Users can write elegant reproducible documents, manuscripts, dissertations, books, blog posts, posters, and slides within the framework of R markdown. It is exciting, while the installation and maintenance becomes annoying. In the meanwhile, there are plenty of useful RStudio addins, which equip the RStudio IDE as a powerful markdown editor. However, these little tools are often hidden somewhere deep in the community, and it is difficult to dig them out.

With 'rmd' you can easily explore, install, and load them for both R users and non-users. Furthermore, 'rmd' provides a RStudio addin to explore the R Markdown family and install them with a single click.

Forget R, and enjoy the wonderful world of R Markdown.

Continue reading

[R: New Features on mindr] Support LaTeX Equations. Conversion between .R scripts and .Rmd documents

New Features The new version 1.1.7 brings more exciting features. Keep the LaTeX equations when converting markdown files into mindmaps, as a reply to specter119's comment. I used some regular expressions to extract the LaTeX codes from the markdown files, and changed them into extended mindmap syntax supported by Docear. Commit: keep LaTeX equations; re-organize the codes Figure 1. A mind map with LaTeX equations converted by mindr from a markdown file

Continue reading

[R pinyin: New Features] User customized dictionaries

The pinyin package intended to convert Chinese characters into pinyin. However, more demands were called by users. That was why the features of converting to four-corner codes and five-stroke codes (version 98) were added. After my previous update, the utopian moderator @justyy kindly suggested adding the Five-Stroke-86 as well. I totally agree, and I think there could be more.

Continue reading