Skip to content

Commit

Permalink
Add as.character()
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Aug 28, 2024
1 parent 79e932d commit 0e9a6ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vignettes/glue.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ The `"glue"` class exists primarily for the sake of a print method, which displa
Most of the time this is *exactly* what the user wants to see.
The example above happens to be an exception, where we really do want to see the underlying string representation.

Here's another example to drive home the difference between printing a glue object and looking at its string representation:
Here's another example to drive home the difference between printing a glue object and looking at its string representation.
`as.character()` is a another way to do this that is arguably more expressive.

```{r}
x <- glue('
Expand All @@ -130,6 +131,7 @@ class(x)
x
unclass(x)
as.character(x)
```

## Delimiters
Expand Down

0 comments on commit 0e9a6ac

Please sign in to comment.