Question: How to remove curly brackets in R?
Eg. "{abcd}" to "abcd"

How can I use gsub function in R to do this? If any other method is available, please suggest.

Answer: 
Try this 

```
gsub("\\{|\\}", "", "{abcd}")
[1] "abcd"

```

Or this 

```
gsub("[{}]", "", "{abcd}")

```
```
x <- "{abcd}"
gsub("^\\{+(.+)\\}+$", '\\1', x)

```

This will remove all braces on either end of the string. The difference between this and @Dickoa's answer is that this would leave any braces inside the string alone.