add line breaks between elements of a vector in RStudio editor

I have seen someone paste vector elements into their RStudio editor and then through some keyboard shortcut introduce a line break at each space between vector elements. In this view they can use RStudio's Alt + Click feature to add text (such as commas) after each element, and then transition all the items back into a wide view.

How is this done?

# original vector
"element1" "element2" "element3"

# stage 2

# stage 3

# final stage in wide view
"element1", "element2", "element3"

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.