我正在尝试运行命令
matched_words <-"pti|ptis|#pti|#pakistantehreekeinsaf|pakistantehreekeinsaf|tehreek-e-insaf|tahreek-e-insaf|tehreek e insaf|tahreek e insaf|TehreekeInsaf|TahreekeInsaf|@insafpk|insafpk|@ptiofficial|ptiofficial|pti|@PTIOfficialRWP|PTIOfficialRWP|PTI Rwp Official|@PTIOfficialVHR|PTIOfficialVHR|PTI Vehari|@PTIOfficialMTN|PTIOfficialMTN|PTI Multan|@ptinorthpunjab|ptinorthpunjab|pti north @ptiofficialisb|ptiofficialisb|PTI islamabad|@ptiofficialatk|ptiofficialatk|PTI attock|@ptiofficiallhr|ptiofficiallhr|pti lahore|@PTIWPOfficial|PTIWPOfficial|PTI West Punjab|@PTISamuOfficial|PTISamuOfficial|PTI Samundri|@ptiofficialcnt|ptiofficialcnt|PTI Chiniot Official|@PTICPOfficial|PTICPOfficial|PTI Central Punjab|@PTIOfficialOKR|PTIOfficialOKR|PTI Okara|@PTIWPOfficial|PTIWPOfficial|PTI West Punjab|@PTIKPOfficial|PTIKPOfficial|PTI KP (Official)|PTI KP Official|@ptiopakpattan|ptiopakpattan|pti pakpattan|@PTIOfficialOKR|PTIOfficialOKR|PTI Okara|@PTIOfficialRP|PTIOfficialRP|PTI Rajanpur|@PTISPOfficial|PTISPOfficial|PTI South Punjab|@ptilodhran|ptilodhran|pti lodhran|@ptiofficiallod|ptiofficiallod|@PTIDGKOFFICIAL|PTIDGKOFFICIAL|PTI DG Khan|@PTIBWNOfficial|PTIBWNOfficial|PTI Bahawalnagar|@PTIOfficialSMT|PTIOfficialSMT|PTI Official SMT|@PTIOfficialCKL|PTIOfficialCKL|PTI Chakwal|@ptiforlife|ptiforlife|pti family|#ptiforlife|#ptiyouthforce|ptiyouthforce|#ptibannujalsa|ptibannujalsa|#ptijalsa|ptijalsa|#voteforbat|voteforbat|#ptileadsbyexample|ptileadsbyexample|@ptifinland|ptifinland|pti finland|#imrankhanemotionalspeech|imrankhanemotionalspeech|@swlptiofficial|swlptiofficial|pti sahiwal|#ptikarachijalsa|ptikarachijalsa|#karachirejectspti|karachirejectspti|#ptiminarepakistanjalsa|ptiminarepakistanjalsa|@ptipunjabpk|ptipunjabpk|pti punjab|#ptisweepingpunjab|ptisweepingpunjab|#ptipppclashkarachi|ptipppclashkarachi|@ukptiofficial|ukptiofficial|pti uk|#voteforimrankhan|voteforimrankhan|#ptimalircampaign|ptimalircampaign|#ptiforkpfatamerger|ptiforkpfatamerger|#ikinkarachi|ikinkarachi|#karachirejectspti|karachirejectspti|#karachirejectspti|karachirejectspti|#jeetaygaimrankhan|jeetaygaimrankhan|@ptipoliticss|ptipoliticss|pti politics|@ptipolitics|ptipolitics|@ptilodhran|ptilodhran|#pakistantehreekinsafians|pakistantehreekinsafians|#ptisupporterbczofyou|ptisupporterbczofyou|#isupportpti|isupportpti|@pti0ffcial|pti0ffcial|#ptisupporters|ptisupporters|@PTICPOfficial|PTICPOfficial|PTI Central Punjab|#primeministerimrankhan|primeministerimrankhan|@ptiofficialjwl|ptiofficialjwl|pti official jaranwala|pti jaranwala|@imrankhanpti|imrankhanpti|imran khan|imran khans|imrans|@azamkhnswati|azamkhnswati|azam khan sawati|azam sawati|azam khan swati|azam swati|@yasminrashidpti|yasminrashidpti|yasmin rashid pti|yasmin rashid|dr.yasmin rashid|dr. yasmin rashid|dr yasmin rashid|yasmin rashid|yasmeen rashid|@pervezkhattakcm|pervezkhattakcm|pervez khattak|pervaiz khattak|parvaiz khattak|parvez khattak|@mehmoodurrashed|mehmood ur rasheed|mahmood ur rasheed|@smqureshipti|smqureshipti|shah mahmood qureshi|shah mehmood qureshi|mahmood qureshi|mehmood qureshi|@chmsarwar|chmsarwar|mohammad sarwar|muhammad sarwar|@udarofficial|udarofficial|usman dar|@aleemkhan_pti|aleemkhan_pti|aleemkhanpti|aleemkhan pti|abdul aleem khan|aleem khan|abdul aleem|@shireenmazari1|shireenmazari1|shireen mazari|@asad_umar|asad_umar|asad umar|asadumar|asad umer|asadumer|@jahangirktareen|jahangirktareen|jahangir khan tareen|jahangir tareen|jahangir khan|@shafqat_mahmood|shafqat_mahmood|shafqatmahmood|shafqat mahmood|shafqat mahmood|@imranismailpti|imranismailpti|imran ismail|@ejazchaudhary|ejazchaudhary|ejaz chaudhary|@naeemul_haq|naeemul_haq|naeemul haq|naeem ulhaq|naeemulhaq|naeem ul haq|naeem-ul-haq|naeem ul haque|naeem-ul-haque|@arifalvi|arifalvi|dr.arif alvi|dr. arif alvi|dr arif alvi|arif alvi|@nadeemchanpti|nadeemchanpti|nadeem afzal chan|@sajidalanghapti|sajidalanghapti|@MuradSaeedPTI|uradSaeedPTI|Murad Saeed|@imranismailpti|imranismailpti|imran ismail|@amirhussainpti|amirhussainpti|@asadqaiserpti|asadqaiserpti|asad qaiser|asad qaisar|@Shah_FarmanPTI|Shah_FarmanPTI|Shah FarmanPTI|farmanpti|Shah Farman|shah farman pti|@muhammadpti|muhammadpti|ali muhammad khan|ali mohammad khan|@khurrumzamanpti|khurrumzamanpti|khurrum sher zaman|@mehmoodurrasheed|mehmoodurrasheed|#mehmoodurrasheed|nadeemhaque|@nadeemhaque|#nadeemhaque|#pti100daysagenda|pti100daysagenda|@mushtaqghanipti|mushtaqghanipti|Mushtaq Ghani|@mianamateenpti|mianamateenpti|@ptiofficialrwp|ptiofficialrwp|pti rwp official|pti rawalpindi official|@ptiofficialswat|ptiofficialswat|pti swat|@hamzaaminpti|hamzaaminpti|hamza amin"
但是得到这个
+
+
+
+
我该如何摆脱呢?
答案 0 :(得分:0)
使用经典编辑器将字符串保存在.txt中,然后加载它:
library(readr)
mystring <- read_file("path/to/myfile.txt")