I am dealing with the following strings:
"I(x - lambda * WX)(Intercept)" "I(x - lambda * WX)pres_dem_two_party_vote_percent"
"I(x - lambda * WX)dem_seat" "I(x - lambda * WX)forgnpct"
"I(x - lambda * WX)blackpct" "I(x - lambda * WX)log_people_per_mi2"
I would like to remove : I(x - lambda * WX)
from the string so that all that is left is:
"(Intercept)" "pres_dem_two_party_vote_percent"
"dem_seat" "forgnpct"
"blackpct" "log_people_per_mi2"
I have tried to use gsub and str_replace, with no success.
Any help you could offer, I would be grateful. Thanks so much!