Displaying 6 results from an estimated 6 matches for "allowna".
Did you mean:
allowa
2020 Apr 04
0
Possible Bug In Validation of UTF-8 Sequences
...t;- paste0('\ud840', '\udc00') # surrogates remain
??? good <- c('hello', 'world', surr_good, '\ud7ff', '\ue000', '\U0010ffff')
??? bad <- c(surr_bad, '\ud800', '\udfff', '\U00110000')
On R3.6.3:
??? nchar(good, allowNA=TRUE)
??? [1] 5 5 1 1 1 1
??? nchar(bad, allowNA=TRUE)
??? [1] 2 1 1 1
On R-devel (2020-03-31 r78116) w/ patch:
??? nchar(good, allowNA=TRUE)
??? [1] 5 5 1 1 1 1
??? nchar(bad, allowNA=TRUE)
??? [1] NA NA NA NA
I ran `make check-devel` successfully, although I did have to suppress
one PCRE test[...
2007 Oct 26
1
How to remove non-UTF-8 characters from a string
All,
I am trying to post text from an XLS spread to my wiki and I need to
remove any characters that are not UTF-8. Is there an easy gsub command
that can do this?
(I previously sent this same email to r-sig-gui. That was a mistake and
I apologize for the duplication.)
Thanks, Roger J. Bos
********************************************************************** *
This message is for the named
2011 Nov 13
0
Roxygen2: version 2.2
...\code{\link{nchar}} which this function wraps? ? #' @export
#' @examples? ? #' str_length(letters)? ? #' str_length(c("i",
"like", "programming", NA))? ? str_length <- function(string) {
string <- check_string(string)
? ? ? nc <- nchar(string, allowNA = TRUE)? ? ? is.na(nc) <-
is.na(string)? ? ? nc? ? }
When you `roxygenise` your package these comments will be
automatically transformed to the Rd file you need to pass `R CMD
check`:
? ? \name{str_length}? ? \alias{str_length}? ? \title{The length of a
string (in characters).}? ? \usage{str_len...
2011 Nov 13
0
Roxygen2: version 2.2
...\code{\link{nchar}} which this function wraps? ? #' @export
#' @examples? ? #' str_length(letters)? ? #' str_length(c("i",
"like", "programming", NA))? ? str_length <- function(string) {
string <- check_string(string)
? ? ? nc <- nchar(string, allowNA = TRUE)? ? ? is.na(nc) <-
is.na(string)? ? ? nc? ? }
When you `roxygenise` your package these comments will be
automatically transformed to the Rd file you need to pass `R CMD
check`:
? ? \name{str_length}? ? \alias{str_length}? ? \title{The length of a
string (in characters).}? ? \usage{str_len...
2007 Oct 03
1
R-2.6.0 is released
...means that the later arguments must be named in full.
o The default type for nchar() is now "chars". This is almost
always what was intended, and differs from the previous default
only for non-ASCII strings in a MBCS locale. There is a new
argument 'allowNA', and the default behaviour is now to throw
an error on an invalid multibyte string if type="chars" or
type="width".
o Connections will be closed if there is no R object referring to
them. A warning is issued if this is done, either at garbage...
2007 Oct 03
1
R-2.6.0 is released
...means that the later arguments must be named in full.
o The default type for nchar() is now "chars". This is almost
always what was intended, and differs from the previous default
only for non-ASCII strings in a MBCS locale. There is a new
argument 'allowNA', and the default behaviour is now to throw
an error on an invalid multibyte string if type="chars" or
type="width".
o Connections will be closed if there is no R object referring to
them. A warning is issued if this is done, either at garbage...