SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This takes a character vector (like the levels of a factor) and prints each element in quotes with commas between.
  2. # (There has got to be a better way to do this.)
  3. # BUT it does the trick for nasty, nasty, shameful copying and pasting.
  4.  
  5. make_editable_list = function(x){
  6.   step1 = paste0(levels(x), collapse = "\", \"")
  7.   step2 = paste0("\"", step1, "\"")
  8.  
  9.   return(cat(step2))
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top