Learn R Programming

cld (version 0.0.1)

cld_methods: Print and coercion methods for cld_object

Description

Print and coercion methods for cld_object

Usage

# S3 method for cld_object
print(x, ...)

# S3 method for cld_object as.data.frame(x, ...)

# S3 method for cld_object as.character(x, ...)

# S3 method for cld_object as_tibble(x, ...)

Value

  • print.cld_object(): Invisibly returns the input object

  • as.data.frame.cld_object(): Returns a plain data frame

  • as.character.cld_object(): Returns a named character vector of letters

  • as_tibble.cld_object(): Returns a tibble

Arguments

x

A cld_object to print or convert

...

Additional arguments passed to print methods

See Also

  • make_cld() for creating compact letter displays

  • as_cld() for converting objects to cld_object

Examples

Run this code
obj <- pairwise.wilcox.test(chickwts$weight, chickwts$feed, exact = FALSE)
result <- make_cld(obj)

# Print method
print(result)

# Convert to plain data frame
as.data.frame(result)

# Convert to named character vector
as.character(result)

# Convert to tibble
if (requireNamespace("tibble", quietly = TRUE)) {
  tibble::as_tibble(result)
}

Run the code above in your browser using DataLab