作者celestialgod (天)
看板R_Language
標題[問題] (救回) find & substr 在r的應用
時間Sun Nov 20 14:52:15 2016
相關作者訊息已經遮蔽
目前學習使用r 遇到想切特定符號後數字
例如
/x/1771416
想抓第二個slash後面的七個字
在以前excel 我大概用find,find,substr去抓就可以了
目前在book看到str_detect
但似乎只會傳輸T or F
另外有看到有人提到gregexpr
但似乎會回傳list
可以請問這樣的例子要怎樣處理嗎?
謝謝
--
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1463141300.A.448.html
→ celestialgod: substring, sub, str_replace, ....很多都可以做到 05/14 00:29
推 Wush978: 置底的翻轉教室,02-01 05/14 10:59
※ 編輯: celestialgod (36.233.51.224), 11/20/2016 14:58:21