R command to check for an ALL CAPS sequence in every row of a file
There is a csv data file that is populated with lot of raw data as follows:
id data
1 it's a programming language
2 this data is JUNK
3 refer www.google.com
4 check for more information
I need to process this data, and check for an ALL CAPS sequence for every
row and populate a new column with a 0/1 entry.
Output file is as follows:
id data all_caps
1 it's a programming language 0
2 this data is JUNK 1
3 refer www.google.com 0
4 check for more information 0
How to achieve this with R? I have been searching for this for a while
now, not able to find any fruitful results for the processing of each row.
Any help in this regard will be greatly appreciated.
Thanks in advance.
No comments:
Post a Comment