remove everything after a character in r code example Example: remove everything in r #in R rm(list=ls())