[R] Calculating distance between words in string

S Ellison S.Ellison at LGCGroup.com
Wed Nov 11 14:15:24 CET 2015


> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Karl
> Subject: [R] Calculating distance between words in string
>
> .. given a specific keyword, I need to assign labels to the other words
> based on the distance (number of words) to this keyword.
> 
>...
> If the sentence contains more than one instance of the keyword, I need values
> for each instance. 

What would you like to happen when the sentence contains more than one instance of other words and more than one instance of both?

e.g. what output do you want from 
" amet is not the only instance of 'amet', and there is more than one instance of 'instance', 'is', 'of' and 'and'."


S Ellison


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list