About this question
I am using R and tried some.function but I got following error message:
Error: could not find function "some.function"
This question comes up very regularly. When you get this type of error in R, how can you solve it?
I am using R and tried some.function but I got following error message:
Error: could not find function "some.function"
This question comes up very regularly. When you get this type of error in R, how can you solve it?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Data Science Expert
Answered on Jul 15, 2021
The possible reasons for getting r could not find function error solved are as follows:
You did not spell the function name correctly.
The function is contained in a library which is not installed.
The library of the function is not loaded with either library() or require().
The version of R you are using is obsolete where that function does not exist.
You can use the following code to check the package in which the function is contained:
help.search("function_name") or ??function_name
To find the function, use the following functions:
find(function_name)OR
getAnywhere(function_name)You can also use the findFn from the sos package to display the packages containing the function as follows:
install.packages("sos") library("sos") findFn("function_name")It will open a web page that will show all the libraries where the function is contained.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Data Science guides from industry experts
Common Data Science interview questions, answered
Guides, tips and career advice on Data Science from JanBask experts.
Data Science The Best Data Science Projects (Beginner To Advanced)
Discover 15 data science project ideas from beginner to advanced levels. Includes tech stacks, time estimates, & real-use cases.…
Data Science Data Science vs Software Engineering - What you should know?
Compare Data Science vs. Software Engineering - explore skills, tools, roles, salaries, and career scope. Discover which tech…
Data Science Top 15 Deep Learning Algorithms You Must Know in 2025
Discover the top 15 deep learning algorithms powering AI in 2025. Learn how deep learning models, DL models, and deep machine…
Data Science Deep Learning Tutorial Guide for Beginners
Deep Learning, Machine Learning & Artificial Intelligence have become trending words of the IT sector today.