How to Solve – Error Could not Find Function … in R (Example Code)
In this post you’ll learn how to solve the R programming error “could not find function X” in R.
Example: Solving the Error Message: Could not Find Function …
str_detect("XXAXXBXXC", "A") # Reproduce error message # Error in str_detect("XXAXXBXXC", "A") : # could not find function "str_detect" |
str_detect("XXAXXBXXC", "A") # Reproduce error message # Error in str_detect("XXAXXBXXC", "A") : # could not find function "str_detect"
First, we have to install and load the dplyr package:
install.packages("stringr") # Install & load stringr package library("stringr") |
install.packages("stringr") # Install & load stringr package library("stringr")
str_detect("XXAXXBXXC", "A") # Run function again # [1] TRUE |
str_detect("XXAXXBXXC", "A") # Run function again # [1] TRUE