How would you concatenate the elements of a vector into a single string with a comma between each element?

  • None of the above
  • Use the paste() function with both sep and collapse set to ","
  • Use the paste() function with collapse = ","
  • Use the paste() function with sep = ","
To concatenate the elements of a vector into a single string with a comma between each element, you would use the 'paste()' function with 'collapse = ","'. This will concatenate all the elements into a single string with a comma as the separator between each element.
Add your answer
Loading...

Leave a comment

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