stringi

package 'stringi' does not work after updating to R3.2.1

拟墨画扇 提交于 2019-11-27 01:49:23
问题 I saw a version of this question posted, but still did not see the answer. I am trying to use ggplot2 but get the following errors (everything worked this morning using R3.0.2 'frisbee sailing' with RStudio version 0.98.1102. I updated both R and Rstudio and now get the following: library(ggplot) Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘stringi’ Error: package or namespace load failed for ‘ggplot2’ So naturally I tried: > install

R/regex with stringi/ICU: why is a '+' considered a non-[:punct:] character?

孤街醉人 提交于 2019-11-26 09:12:07
问题 I\'m trying to remove non-alphabet characters from a vector of strings. I thought the [:punct:] grouping would cover it, but it seems to ignore the + . Does this belong to another group of characters? library(stringi) string1 <- c( \"this is a test\" ,\"this, is also a test\" ,\"this is the final. test\" ,\"this is the final + test!\" ) string1 <- stri_replace_all_regex(string1, \'[:punct:]\', \' \') string1 <- stri_replace_all_regex(string1, \'\\\\+\', \' \') 回答1: POSIX character classes