forked from dnieuw/BasicRcourseEMC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions_intro2.qmd
More file actions
21 lines (11 loc) · 1.05 KB
/
Copy pathfunctions_intro2.qmd
File metadata and controls
21 lines (11 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Functions 2
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 oft 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", lib = "/directory/to/my custom R library", repos = "http://cran.xl-mirror.nl")`
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") ## quotes are optional when loading a package`