We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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!
The text was updated successfully, but these errors were encountered:
Also, if you really want, you can get the same results for these ones by using str_replace_na(NA).
str_c("foo", str_replace_na(NA), sep = " ") #> [1] "foo NA"
instead of
paste("foo", NA) #> [1] "foo NA"
and
str_c("foo", str_replace_na(NA)) #> [1] "fooNA"
paste0("foo", NA) #> [1] "fooNA"
Sorry, something went wrong.
No branches or pull requests
This is all well and good:
"Since str_c() does not separate strings with spaces by default it is closer in behavior to paste0()."
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.
Link to the page: https://jrnold.github.io/r4ds-exercise-solutions/strings.html#exercise-14.2.1
Thank you!
The text was updated successfully, but these errors were encountered: