ID EN
String Functions

formatDL

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Format vektor item dan deskripsinya sebagai tabel 2 kolom atau daftar deskripsi gaya LaTeX.

Syntax

R
formatDL(x, y, style = c("table", "list"),
         width = 0.9 * getOption("width"), indent = NULL)

Arguments

Parameter Deskripsi
x a vector giving the items to be described, or a list of length 2 or a matrix with 2 columns giving both items and descriptions.
y a vector of the same length as x with the corresponding descriptions. Only used if x does not already give the descriptions.
style a character string specifying the rendering style of the description information. Can be abbreviated. If "table", a two-column table with items and descriptions as columns is produced (similar to Texinfo's @table environment). If "list", a LaTeX-style tagged description list is obtained.
width a positive integer giving the target column for wrapping lines in the output.
indent a positive integer specifying the indentation of the second column in table style, and the indentation of continuation lines in list style. Must not be greater than width/2, and defaults to width/3 for table style and width/9 for list style.

Return Value

vektor karakter dengan entri yang diformat.

Details

Setelah mengekstraksi vektor item dan deskripsi terkait dari argumen, keduanya dipaksa menjadi vektor karakter. Dalam gaya tabel, item dengan lebih dari indentasi - 3 karakter ditampilkan pada barisnya sendiri.

Contoh

Example
R
# NOT RUN {
## Provide a nice summary of the numerical characteristics of the
## machine R is running on:
writeLines(formatDL(unlist(.Machine)))
## Inspect Sys.getenv() results in "list" style (by default, these are
## printed in "table" style):
writeLines(formatDL(Sys.getenv(), style = "list"))
# }