Re: [R] Identifying special characters in a text file

2010-02-11 Thread jim holtman
Setup a regular expression to only keep what you want. This example keep alpha, nums, spaces , commas and periods: > x <- readLines(textConnection('I discovered that the following works: +any(is.na(strsplit(readLines(FILE), ""))) + + I am wondering whether anyone has a better approach to

[R] Identifying special characters in a text file

2010-02-11 Thread Dennis Fisher
Colleagues R 2.10.1 on a Mac I read in textfiles using readLines, then I process those files, then I use R to execute another program. Occasionally those files contain characters other than letter / numbers / routine punctuation marks. For example, a bullet (option-8 on a Mac) triggers the