Let's now try and execute the sum() and sqrt() functions in R. Follow the steps given below:
- Open the R console on your system.
- Type the code as follows:
sum(1, 2, 3, 4, 5)sqrt(144)
- Execute the code.
Output: The preceding code provides the following output:
Functions such as sum() and sqrt() are called base functions, which are built into R. This means that they come pre-installed when R is downloaded.
We could build all of our code right in the R console, but eventually, we might want to see our files, a list of everything in our global environment, and more, so instead, we'll use RStudio. Close ...