Well, if the issue is only to put tab stops around something, then
this is probably the easiest way to go:
some.corpus<-c("This is a pretty stupid example sentence.", "And this
is probably an even more stupid example sentence.")
(with.tabs<-gsub("\\b(stupid)\\b", "\t\\1\t", some.corpus, perl=T))
Note that the second line here does not require non-word characters to
be present but just requires a word boundary, which is sometimes
better (e.g., at the end of strings when no non-word character is
following).
If you have a list of the kind you have and want to convert it to a
list, just use unlist
(some.list<-strsplit(some.corpus, "stupid"))
(vectors.again.1<-unlist(some.list))
And, since your list seems to have broken up things that belong
together, this is how you would paste it together again:
(vectors.again.2<-sapply(some.list, paste, collapse="stupid"))
HTH,
STG
--
Stefan Th. Gries
-----------------------------------------------
University of California, Santa Barbara
http://www.linguistics.ucsb.edu/faculty/stgries
-----------------------------------------------