Source Function

Source function in R is used to use functions that are created in another R script. The syntax of this function is given below:

source(“Users/harsh/Desktop/w3wiki/gfg.R”)

All we are required is to put the above line at the top of the script in which we want to use a function of the gfg.R file.

How to use the source Function in R

In this article, we will be looking at the practical implementation of the source function in the R programming language.

Similar Reads

Source Function:

Source function in R is used to use functions that are created in another R script. The syntax of this function is given below:...

Advantages of the source function:

Source function increases the reusability of the code. Once written then we can use the same code in any script. Helpful in handling big projects. Tasks can be completed in lesser time....