Question: Write a R code with following question In column of a dataframe, we have stored strings that tell us if someone likes orange juice, apple
Write a R code with following question

In column of a dataframe, we have stored strings that tell us if someone likes orange juice, apple juice etc. Extract the names of students who like orange juice or oranges. Expected Output: Annie Harry Hint: Use `str_detect before using str_extract() O myVar = c( "Annie likes Orange juice", "Sonny likes Apple juice", "Katy dislikes Orange juice", "Harry likes Oranges", "Charlie likes Apple juice", "Margo like Orange Pie") df = data. frame(myVar) {r} # your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
