Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions printing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,16 @@ cat(month.name[1:4], sep = "")
```

The argument `fill` allows us to break long strings; this is achieved when we
specify the string width with an integer number:
specify the string width with an integer number (or the default set by options()):

```{r cat_ex5}
# fill = 30
options(width=79)
print(options('width'))
cat("Loooooooooong strings", "can be displayed", "in a nice format",
"by using the 'fill' argument", fill = 30)
"by using the 'fill' argument", fill = T)
# fill = 40
cat("Loooooooooong strings", "can be displayed", "in a nice format",
"by using the 'fill' argument", fill = 40)
```

Last but not least, we can specify a file output in `cat()`. For instance,
Expand Down