read.sinxs: Read sayings from spread sheets.

Description Usage Arguments Value Examples

View source: R/sinx.R

Description

Read sayings from spread sheets.

Usage

1
read.sinxs(file = NULL, sep = ",", lib = "sinxs")

Arguments

file

a character string giving a sinx sayings database in csv format (in UTF-8 encoding). By default all csv files in the data directory of the sinx package are used.

sep

seperator of the columns. See '?read.table()'.

lib

library name of the sayings. - 'sinxs': (default) from cosx.org - 'tangshi' - 'songshi' - 'yangsheng' - 'chinese' - 'english' - 'jinyong'

Value

a data frame of sayings, each row contains: - quote: the quote, main part of the sayings, - author: the author of the quote, - context: the context in which it was quoted (if available, otherwise NA), - source : where it was quoted (if available, otherwise NA), - date: when it was quoted (if available, otherwise NA).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
libs <- read.sinxs()

libs <- read.sinxs(lib = "jinyong")

libs <- read.sinxs(lib = c("tangshi", "songshi", "chinese", "yangsheng", "english", 
    "jinyong"))

path_f <- system.file("fortunes/fortunes.csv", package = "fortunes")
path_s <- system.file("sinxs/sinxs.csv", package = "sinx")
libs <- sinx::read.sinxs(c(path_f, path_s), sep = c(";", ","))

sinx documentation built on July 1, 2020, 10:31 p.m.