Reputation: 355
In a dataframe frame like this:
data.frame(term = c("clear text","character <U+C6C3>","<e9>guret text"))
Is there any command which could provide the removal of the character inside the <>
Example output:
data.frame(term = c("clear text","character","guret text"))
Upvotes: 0
Views: 37
Reputation: 4184
Simple usage of gsub
and trimws
.
data <- data.frame(term = c("clear text", "character <U+C6C3>", "<e9>guret text"))
data$term <- trimws(gsub("<.*>", "", data$term))
Upvotes: 2