I'm using R and I have a data.frame with nearly 2,000 entries that looks as follows:
> head(PVs,15)
LogFreq Word PhonCV FreqDev
1593 140 was CVC 5.480774
482 139 had CVC 5.438114
1681 138 zou CVVC 5.395454
1662 137 zei CVV 5.352794
1619 136 werd CVCC 5.310134
1592 135 waren CVV-CV 5.267474
620 134 kon CVC 5.224814
646 133 kwam CCVC 5.182154
483 132 hadden CVC-CV 5.139494
436 131 ging CVC 5.096834
734 130 moest CVVCC 5.054174
1171 129 stond CCVCC 5.011514
1654 128 zag CVC 4.968854
1620 127 werden CVC-CV 4.926194
1683 126 zouden CVV-CV 4.883534
What I want to do is to create a new data.frame that is equal to PVs, except that all entries having as a member of the "Word" column a string of character that does NOT end in either "te" or "de" removed. i.e. All words not ending in either "de" or "te" should be removed from the data.frame.
I know how to slectively remove entries from data.frames using logical operators, but those work when you're setting numeric criteria. I think to do this I need to use regular expressions, but sadly R is the only programming language I "know", so I'm far from knowing what type of code to use here.
I appreciate your help. Thanks in advance.