ID EN
Miscellaneous

noquote

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Cetak string karakter tanpa tanda kutip.

Syntax

R
noquote(obj, right = FALSE)<p></p><p># S3 method for noquote
print(x, quote = FALSE, right = FALSE, &#8230;)</p><p># S3 method for noquote
c(&#8230;, recursive = FALSE)</p>

Arguments

Parameter Deskripsi
obj any R object, typically a vector of character strings.
right optional logical eventually to be passed to print(), used by print.default(), indicating whether or not strings should be right aligned.
x an object of class "noquote".
quote, &#8230; further options passed to next methods, such as print.
recursive for compatibility with the generic c function.

Details

noquote mengembalikan argumennya sebagai objek kelas "noquote". Ada metode untuk c() dan metode subskrip ("[.noquote") yang memastikan bahwa kelas tidak hilang karena subsetting. Metode cetak (print.noquote) mencetak string karakter tanpa tanda kutip ("\titik"). Jika hak ditentukan dalam panggilan print(x, right=*), maka akan lebih diutamakan daripada kemungkinan pengaturan kanan x, misalnya, dibuat oleh x <- noquote(*, right=TRUE). Fungsi-fungsi ini ada baik sebagai utilitas dan sebagai contoh penggunaan kelas (S3) dan orientasi objek.

Contoh

Example
R
# NOT RUN {
letters
nql <- noquote(letters)
nql
nql[1:4] <- "oh"
nql[1:12]

cmp.logical <- function(log.v)
{
  ## Purpose: compact printing of logicals
  log.v <- as.logical(log.v)
  noquote(if(length(log.v) == 0)"()" else c(".","|")[1 + log.v])
}
cmp.logical(stats::runif(20) > 0.8)

chmat <- as.matrix(format(stackloss)) # a "typical" character matrix
## noquote(*, right=TRUE)  so it prints exactly like a data frame
chmat <- noquote(chmat, right = TRUE)
chmat
# }
# NOT RUN {
<!-- %dont -->
# }

See Also

methods class print.