search for: i_was_not_ascii

Displaying 1 result from an estimated 1 matches for "i_was_not_ascii".

2016 Apr 04
0
Find the dataset(s) that contain(s) non-ASCII characters
...r non-ASCII characters ... NOTE Note: found 4 marked UTF-8 strings I wonder how to find which dataset(s) (all recorded as rda files) contain(s) non-ASCII characters. Using the iconv function let us to find or replace non-ASCII characters iconv(x, "UTF-8", "ASCII", sub="I_WAS_NOT_ASCII") I use the following function to detect non-ASCII characters. testASCII <- function(idata) { col <- (1:NCOL(idata))[sapply(idata, is.factor)] col <- c(col, (1:NCOL(idata))[sapply(idata, is.character)]) for(i in col) { x <- idata[, i] cat(colnames(idata)[i], "\n&qu...