Replace character in R dataset
Lets assume we have folowing dataset
| Name | Date |
|---|---|
| somefoo | 1 |
| another | 2 |
library(stringr)
df <- str_replace_all(df1$Name , 'foo', 'bar')
| Name | Date |
|---|---|
| somebar | 1 |
| another | 2 |
Lets assume we have folowing dataset
| Name | Date |
|---|---|
| somefoo | 1 |
| another | 2 |
library(stringr)
df <- str_replace_all(df1$Name , 'foo', 'bar')
| Name | Date |
|---|---|
| somebar | 1 |
| another | 2 |