removing words based on a predefined vector
texts &lt;- c("This is the first document.", 
       "Is this a text?", 
       "This is the second file.", 
       "This is the third text.", 
       "File is not this.") 

test_stopword &lt;- as.data.frame(texts)
ordinal_stopwords  &lt;- c("first","primary","second","secondary","third")

(newdata &lt;- as.data.frame(sapply(texts, function(x)   gsub(paste(ordinal_stopwords, collapse = '|'), '', x))))


The output is getting skewed when added in a code block (maybe a bug in SE). But, you would get the desired output.