Creating Dummy Variables from List
问题 So I'm trying to create dummy variables to attach to a data frame based on whether or not a specific column of the frame has specific words in it. The column would look something like this: dumcol = c("good night moon", "good night room", "good morning room", "hello moon") and I'd be creating dummy variables based on which words are contained in each row, e.g. for the first one, it contains "good", "night", and "moon" , but not "room", "morning" or "hello" . The way I've been going about it