Description Usage Arguments Details Value Note Examples
Check if each element of a character vector is valid in its implied encoding.
1 2 3 |
x |
A character vector. |
These use similar checks to those used by functions such as
grep
.
validUTF8
ignores any marked encoding (see
Encoding
) and so looks directly if the bytes in each
string are valid UTF-8.
validEnc
regards character strings as validly encoded unless
their encodings are marked as UTF-8 or they are unmarked and the R
session is in a UTF-8 or other multi-byte locale. (The checks in
other multi-byte locales depend on the OS and as with
iconv
not all invalid inputs may be detected.)
A logical vector of the same length as x
. NA
elements
are regarded as validly encoded.
It would be possible to check for the validity of character strings in a Latin-1 encoding, but extensions such as CP1252 are widely accepted as ‘Latin-1’ and 8-bit encodings rarely need to be checked for validity.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.