While scripts are just listings of code stored outside of R, functions are objects of the function mode and are stored in the workspace. Most functions require specific kinds of arguments, which must be input into the function correctly. For example, if a function calls for a matrix and a data frame is input, the function will return an error. Since external tables are often read into the R workspace as data frames, using a data frame for ...
8. How to Use a Script or Function
Get R 4 Quick Syntax Reference: A Pocket Guide to the Language, API's and Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.