Rのリストから英数字以外の文字を削除することについて質問があります。リストにはあらゆる種類の奇数文字、空白などがあり、それらを削除したいと思います。私は通常、rのtmパッケージを使用して必要なものを削除することができます。私はそれをいじくり回しましたが、どこにも行き着かなかったので、リストに戻ることが出発点かもしれないと思いました。
リスト:
list("\n \n", "\n\n ", "\n ", " ", "\n ",
"\n \n ", "\n ", "Home", "\n", "Expertise",
"Question & Research Design", "\n", "Survey Development & Validation",
"\n", "Data Processing", "\n", "Statistical Analysis", "\n",
"Publications & Grants", "\n", "Evaluation", "\n", "\n",
"Consulting Areas", "Business", "\n", "Education", "K-12",
"\n", "Â ", " Â Â Â Â", " | ")
期待される出力
[1] "" "" ""
[4] "" "" ""
[7] "" "Home" ""
[10] "Expertise" "Question Research Design" ""
[13] "Survey Development Validation" "" "Data Processing"
[16] "" "Statistical Analysis" ""
[19] "Publications Grants" "" "Evaluation"
[22] "" "" "Consulting Areas"
[25] "Business" "" "Education"
[28] "K12" "" ""
[31] "" ""