Social Media Research

02 R Data Analysis


Question

How do you get part of a string in R ?


Answer

use the function substr(string, start_index, end_index)

> substr("foobar", 1,3)
[1] "foo"



Comments