-
Notifications
You must be signed in to change notification settings - Fork 3
/
3-1_functions_intro.qmd
23 lines (12 loc) · 1.07 KB
/
3-1_functions_intro.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Functions {.unnumbered}
Functions are things you can do. R comes with predefined functions which do many things from basic file management to complex statistics. To get started, below are some often used functions. This default set of functions is easily extended by defining your own functions and adding those defined by others conveniently in CRAN and BioConductor packages:
<http://stat.ethz.ch/R-manual/R-patched/library/base/html/00Index.html>
<http://cran.r-project.org/web/packages/available_packages_by_name.html>
<http://www.bioconductor.org/packages/release/bioc/>
Functions are expressed as:
`function.name()`, e.g., `t.test()` or, an operator, e.g., `+`
Easily obtain functions from other R users using `install.packages()`:
`install.packages("packageName")`
Packages are basically a collection of new functions made by people around the world managed by the "CRAN" package repository team.
The package name must be quoted when installing. Besides installing the package on your PC, you need to load it into your R session before you can use it:
`library(packageName)`