Learn R Programming

Nippon (version 0.2.2)

jyear: Convert Japanese year style

Description

jyear calculates a year of the reign of an Emperor, i.e., ``gengo'', which is widely used in official statistics and documents in Japan.

Usage

jyear(x, shift = FALSE, withAD = FALSE, ascii = FALSE)

Arguments

x
numeric. a Cristian year. It must be greater than 1867.
shift
logical. This is for manual adjustment in a particular year. The default value is FALSE. See Details for more information.
withAD
logical. If TRUE, the intact Christian year is also given in output. The default value is FALSE.
ascii
logical. If TRUE, an abbreviation of gengo is used: "M", "T", "S", and "H". If FALSE, the Kanji characters of gengo is provided. The default value is FALSE.

Value

  • character

Details

Japan uses era systems, and on each emperor's reign it would constitute one era. The Japanese traditional era name is widely used in official statistics and documents instead of the Anno Domini system. Recently, the year is often written in traditional form with Christian year, e.g., H12 (2000), because Japanese year style without Christian one is confusing even for Japanese.

jyear calculates such Japanese year from the given Christian year. Is may be useful if the Japanese style is required in statistical graphics or documents.

Since jyear dose not take account of month and day, an unexpected output could be given for a particular year, during which an era changed to a new one. The shift option should be set manually as TRUE in the following period. l{ from January 1 to July 29 in 1912 from January 1 to December 24 in 1926 from January 1 to 7 in 1989 }

See Also

be2ad

Examples

Run this code
jyear(2000,ascii=TRUE)
jyear(2000,withAD=TRUE,ascii=TRUE)
jyear(1989,ascii=TRUE)
jyear(1989,shift=TRUE,ascii=TRUE)

Run the code above in your browser using DataLab