Error in STR_view_all - could not find function "str_view_all"

When I run the code below, I get the error in the title. I have tried uninstalling and re-installing Rstudio and R multiple times. Htmlwidget has been

library(htmlwidgets)
s <- c("70\"",       "5 ft\"",     "4\'11",     "\"\"",         "\".\"",        "\"Six feet\"")
pattern <- \\\d
str_view_all(s, pattern)

str_view_all() is a function in the stringr package. Is that loaded? Please see: https://www.rdocumentation.org/packages/stringr/versions/1.3.1/topics/str_view

Maybe this is what you are trying to do

library(stringr)
s <- c("70\"",       "5 ft\"",     "4\'11",     "\"\"",         "\".\"",        "\"Six feet\"")
pattern <- "\\d" # This matches any digit
str_view_all(s, pattern)

Keep in mind that str_view_all() produces html output on the viewer pane

image

Thank you so much, FJCC. STRINGR was loaded but when I re-installed it, it seems as though it became unloaded. I didn't see what package str_view_all was a part of in the help documentation (it is there in small italic text), and I assumed it was a part of the htmlwidgets package. I need to remember that all anything that begins with str is a part of the stringr package.

Thank you so much. I hadn't loaded the stringr library, and you figured out my 2nd problem which was my original problem before I uninstalled and re-installed my stringr package.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.