3
一部の文字列に英語以外の文字が含まれていないかどうかを確認する必要があります。英語以外の文字の正規表現
x = c('Kält', 'normal', 'normal with, punctuation ~-+!', 'normal with number 1234')
grep(pattern = ??, x) # Expected output:1
一部の文字列に英語以外の文字が含まれていないかどうかを確認する必要があります。英語以外の文字の正規表現
x = c('Kält', 'normal', 'normal with, punctuation ~-+!', 'normal with number 1234')
grep(pattern = ??, x) # Expected output:1
あなたが英語以外の任意の文字を意味するかを参照してください?文字列に非ASCII文字が含まれているかどうかをチェックしたい場合は、['grep(pattern =" [^ [:ascii:]] "、x、perl = TRUE)'](http://ideone.com/vxav28)。 –