Ever have a string of values and you need to turn it into R code? Use the bare_combine() function! For example, let’s say I have the following list of values in some text, excel sheet or pdf. And, you copy into your editor:
Paris, New York, Los Angeles, London, Liverpool, Brussels
However, you want the list of values above in R code format, such as this:
c("Paris", "New York", "Los Angeles", "London", "Liverpool", "Brussels")
But, you’re exhausted about the thought of placing all of those quotes.
- Use bare_combine() from the hrbraddins package with RStuido Addins!
Let’s Try It Out!
- highlight the string of interest and then hit ‘Bare Combine’ found in your RStudio Addins
Until next time!