SHARE
TWEET

Untitled

a guest Jan 4th, 2013 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. d <- data.frame(a = c("A_foo1", "B_foo2", " _foo3"))
  2.        
  3. a
  4. A
  5. B
  6. " "
  7.        
  8. a <- c("A_foo1", "B_foo2", " _foo3")
  9. gsub("_.*", "", a)
  10. #[1] "A" "B" " "
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top