R Coding Errors Suck: Could Not Find Function

Data Scientist Dude
3 min readFeb 10, 2023

One of the most common R coding errors, yet it has easy solutions

photo from Unsplash

What this Error is.

The R programming language literally can’t locate your chosen function in order to utilize it. The error occurs due to the following reasons:

  • Function name misspelled or has the wrong case. Remember that function names are case sensitive in R. My favorite mistake is the function View(df). Notice how the “V” is capitalized. If “df” is a dataframe then it gives you a tabular view of your data in a new tab.
  • The package that contains the function was not installed. You must install packages in R once before using any function contained by them. It is done as install.packages('package_name').
  • The package was not loaded before using the function. To use the function that is contained in a package, you must also load the package. It is executed as library(package_name). Notice how this does not use quotation marks while install.packages('package_name') does.
  • Your version of R or a specific package is old. The version of R is one where the…

--

--

Data Scientist Dude
Data Scientist Dude

Written by Data Scientist Dude

Data Scientist, Linguist and Autodidact - I help people understand and use data models.

Responses (1)