Packages not downloaded automatically with R need to be explicitly loaded separately. When you download R, a set of packages are imported automatically, including base, stats, and some others. The word in the curly braces, indicates that that function is native to "base" R, or the base set of functions and methods that we have access to without loading in other packages. We see here that R is suggesting some options to us of functions that start with sub. Rmd file, we begin to type the function subset(), we get the following: Packages typically are sets of functions that perform related tasks (e.g. These packages are always automatically loaded and available for your use, so when you use a function that exists natively in R, such as the mean() function, that actually exists in a package that R loaded for you already.Īll official packages are submitted and verified through CRAN (Comprehensive R Archive Network). In fact, if you've opened R and read in some data, it's likely you've already used a package! There are a set of packages that are standard ( base) and ship with R when you install it on your computer. R packages are collections of related functions, code, and data, which can be downloaded and used by any R user, as a way of avoiding having to write all the code to do a task manually ourselves. It's important to be familiar with the concept of a package, how we go about using them, and what to do when they don't work how we want them to. Whether you are using R for the first time, or you're a seasoned R expert, using packages makes up a great deal of your daily workload in R. Packages are essential to the work we do in R.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |