Does function showNonASCII(x) in package "tools" do what you need?
Steven McKinney Statistician Molecular Oncology and Breast Cancer Program British Columbia Cancer Research Centre ________________________________________ From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Michael Friendly [frien...@yorku.ca] Sent: July 29, 2010 6:27 PM To: r-help Subject: [R] how to find non-ASCII characters in .Rd files? [Env: Win XP Pro / R 2.11.1] I keep occasionally running into the annoying problem of getting warnings from R CMD check regarding non ASCII characters in .Rd files, without any easy way of finding them. Mostly these come from copy/paste of references or other material from web pages or Win applications, and often involve varieties of quote-like characters, e.g., if I try to include output from anova() as a documentation comment, #Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 These are extremely hard to spot in an editor and R CMD check doesn't give line numbers or indicate what non-ASCII characters were found, so the only way I can easily find the offending characters is to copy the .Rd file to a linux machine and run od -c file.Rd |more What commands can I run in R against a .Rd file to locate such non-ASCII characters -- Michael Friendly Email: frien...@yorku.ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA ______________________________________________ R-help@r-project.org mailing list 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. ______________________________________________ R-help@r-project.org mailing list 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.