Using R, is there a regex way that I get a 'cell' in 'Column1' to update when 'Column2' on the same row contains a word within its contents?
For example# If I wanted cells that contain 'time' anywhere in them to then update the matrix' Column1 to '10' as below
10 that is the time
10 what time is the match
0 where is the car?
We can use
df1$Column1[grep("time", df1$Column2)] <- 10