How does the collapse argument work in the paste() function in R?

  • It collapses all spaces in the output vector
  • It collapses the output vector into a single string with a specified separator
  • It doesn't exist
  • None of the above
The 'collapse' argument in the paste() function in R collapses the output vector into a single string with a specified separator. For example, 'paste(c("Hello", "world!"), collapse = " ")' would return "Hello world!".
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *