Você está na página 1de 2

R: Class for 'no quote' Printing of Character Strings http://127.0.0.1:28599/library/base/html/noquote.

html

noquote {base} R Documentation

Class for no quote Printing of Character Strings

Description

Print character strings without quotes.

Usage

noquote(obj)

## S3 method for class 'noquote'


print(x, ...)

## S3 method for class 'noquote'


c(..., recursive = FALSE)

Arguments

obj
any R object, typically a vector of character strings.

x
an object of class "noquote".

...
further options passed to next methods, such as print.

recursive
for compatibility with the generic c function.

Details

noquote returns its argument as an object of class "noquote". There is a method for c() and
subscript method ("[.noquote") which ensures that the class is not lost by subsetting. The print
method (print.noquote) prints character strings without quotes ("\dots").

These functions exist both as utilities and as an example of using (S3) class and object
orientation.

Author(s)

Martin Maechler maechler@stat.math.ethz.ch

See Also

methods, class, print.

Examples

letters
nql <- noquote(letters)
nql

1 of 2 18/Sep/2017, 10:58 PM
R: Class for 'no quote' Printing of Character Strings http://127.0.0.1:28599/library/base/html/noquote.html

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)

[Package base version 3.4.1 Index]

2 of 2 18/Sep/2017, 10:58 PM

Você também pode gostar