Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rで中括弧を削除するには? 例えば。「{abcd}」から「abcd」
Rでgsub関数を使用してこれを行うにはどうすればよいですか? 他に利用可能な方法があれば、提案してください。
これを試して
gsub("\\{|\\}", "", "{abcd}") [1] "abcd"
またはこれ
gsub("[{}]", "", "{abcd}")