这个问题可能与这个问题有关。
不幸的是,那里给出的解决方案在我的数据中不起作用。
我有以下矢量示例:
可以的吗?
不幸的是,那里给出的解决方案在我的数据中不起作用。
我有以下矢量示例:
example<-c("ChildrenChildren", "Clothing and shoesClothing and shoes","Education, health and beautyEducation, health and beauty", "Leisure activities, travelingLeisure activities, traveling","LoansLoans","Loans and financial servicesLoans and financial services" ,"Personal transfersPersonal transfers" ,"Savings and investmentsSavings and investments","TransportationTransportation","Utility servicesUtility services")
当然,我希望得到没有重复的相同字符串,即:
> result
[1] "Children" "Clothing and shoes" "Education, health and beauty"
可以的吗?