Skip to content

An addition to the solution for Exercise 14.2.1 #612

Description

@AnttiRask

This is all well and good:

"Since str_c() does not separate strings with spaces by default it is closer in behavior to paste0()."

str_c("foo", "bar")
#> [1] "foobar"

But after that I would add something like this:

"However, with the use of the "sep" argument, str_c can replace both paste and paste0.

str_c("foo", "bar", sep = " ")
#> [1] "foo bar"

Link to the page: https://jrnold.github.io/r4ds-exercise-solutions/strings.html#exercise-14.2.1

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions