[R] Help in R code
Bert Gunter
bgunter.4567 at gmail.com
Tue Mar 1 17:06:39 CET 2016
... but if this is homework (it looks like it) ask your teachers for
help, as there is a no homework policy on this list.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Mar 1, 2016 at 4:30 AM, deepak aggarwal <talk4deepak at gmail.com> wrote:
> Hi ,
>
> Seeking your help in coding following requirement in R.
>
> Vector 1 has sentences for ex. vector 1="he is a nice human being","he is
> smart and fast in his work"
>
> vector 2 has keywords found in each sentence seperated by comma
> for ex. vector2 for vector 1 =nice,being
> vector 2 for vector 1 =smart,work
>
> I want output to be vector 3 which will show 2 words before and after where
> match is found
>
> vector 1 vector2 vector 3
> he is a nice human being nice,being is a nice
> human,human being
> he is smart and fast in his work smart,work he is smart,in his work
>
> in all i want vector 3 to how 2 words before and aftr to each word of
> vector 2 from vector 1.
>
> really appriciate your quick help on this.
>
> Thanks & Regards
> Deepak
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list