-
-
Save emhart/a1417d37214354632946 to your computer and use it in GitHub Desktop.
#' The length of a string (in characters). | |
#' | |
#' @param string input character vector | |
#' @return numeric vector giving number of characters in each element of the | |
#' character vector. Missing strings have missing length. | |
#' @seealso \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 | |
} | |
> roxygen2::roxygenise(".") | |
First time using roxygen2 4.0. Upgrading automatically... | |
Writing NAMESPACE | |
Warning messages: | |
1: @title [test.R#1]: unknown tag | |
2: @description [test.R#1]: unknown tag | |
3: @param [test.R#4]: unknown tag | |
4: @return [test.R#5]: unknown tag | |
5: @seealso [test.R#7]: unknown tag | |
6: @export [test.R#8]: unknown tag | |
7: @examples [test.R#9]: unknown tag |
@kevinushey see below as well as this issue
sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11 (unknown)locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8attached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] httr_1.0.0 raster_2.3-40 sp_1.1-0 ggplot2_1.0.1 roxygen2_5.0.0loaded via a namespace (and not attached):
[1] colorspace_1.2-6 digest_0.6.8 grid_3.1.3 gtable_0.1.2 lattice_0.20-31
[6] magrittr_1.5 MASS_7.3-40 munsell_0.4.2 plyr_1.8.2 proto_0.3-10
[11] R6_2.0.1 Rcpp_0.11.6 reshape2_1.4.1 scales_0.3.0 stringi_0.4-1
[16] stringr_1.0.0 tools_3.1.3
This seems to work fine for me... wonder if something else is going on? Can you attach
sessionInfo()
as well?