title: check if all words present in a sentence
body: <p>I am trying to get the output from words_check only if all the words in variable 'words' present in word_check.</p>
  
  <p>I am trying to retrieve output from word_check.</p>
  
  <p>My below code is not returning any value. Please help!</p>
  
  <pre><code>words &lt;- "battery on key issue"
  
  word_check &lt;- c("battery on","key issue","battery on key issue")
  
  pr_wd &lt;- word_check[all(strsplit(word_check," ") %in% strsplit(words," "))] 
  
  </code></pre>
  
  <h2>Expected Output:</h2>
  
  <pre><code>"battery on key issue"
  </code></pre>