12 Course summary
Index of functions used throughout the course
function | package | description | |
---|---|---|---|
1 | ggpairs() | GGally | |
2 | all.equal() | base | |
3 | anyNA() | base | check if there are any NA in a vector/list |
4 | as.character() | base | coerce a vector to character |
5 | as.factor() | base | coerce a vector to factor |
6 | as.numeric() | base | coerce a vector to numeric |
7 | c() | base | Combine values/vectors into a vector |
8 | class() | base | retrieve class of an R object (e.g. ‘numeric’, ‘list’, ‘data.frame’) |
9 | data.frame() | base | create a data.frame from vectors |
10 | dim() | base | get dimensions of a data frame |
11 | exp() | base | exponent |
12 | expression() | base | Used in plots to add symbols to axes |
13 | factor() | base | create a factor |
14 | identical() | base | check if two R objects are identical |
15 | ifelse() | base | return a or b depending on the value of test |
16 | is.character() | base | check if vector is character |
17 | is.data.frame() | base | check if an object is a data frame |
18 | is.factor() | base | check if a vector is of class ‘factor’ |
19 | is.na() | base | check if a value is NA/elements of vector are NA |
20 | is.numeric() | base | check if vector is numeric |
21 | is.vector() | base | check if an object is a vector |
22 | length() | base | get number of elements in a vector or list |
23 | levels() | base | get levels of a factor |
24 | library() | base | load an R package |
25 | list() | base | create a list |
26 | log() | base | log (default base = e) |
27 | max() | base | get maximum of a vector |
28 | mean() | base | get mean of a vector |
29 | min() | base | get minimum of a vector |
30 | names() | base | retrieve names of a list/vector |
31 | nchar() | base | get number of characters in a string |
32 | ncol() | base | get number of columns of a data frame |
33 | nrow() | base | get number of rows of a data frame |
34 | numeric() | base | initialize a numeric vector |
35 | order() | base | get indexes that will sort a vector |
36 | paste() | base | |
37 | print() | base | print object to the console |
38 | prop.table() | base | transform frequency table into table of proportions |
39 | rank() | base | rank the values of a vector |
40 | rep() | base | repeat a value or a vector N times |
41 | rowSums() | base | get sums of a data frame by rows |
42 | rownames() | base | get row names of a data frame |
43 | sapply() | base | apply function to each element of a list |
44 | seq() | base | create a sequence |
45 | sort() | base | sort the values. Specify decreasing = FALSE to sort in decreasing order |
46 | split() | base | split list based on a function/vector |
47 | sqrt() | base | square root |
48 | subset() | base | filter out rows of a data frame according to logical vector |
49 | sum() | base | get sum of numeric values or a vector |
50 | summary() | base | Obtain summary statistics or detailed regression output |
51 | table() | base | obtain frequency table of a variable/cross-tabulation of two variables |
52 | unique() | base | get unique elements |
53 | unlist() | base | |
54 | vapply() | base | |
55 | which() | base | return indexes of TRUE entries of a logical vector |
56 | which.max() | base | return index of the largest value in a vector |
57 | which.min() | base | return index of the smallest value in a vector |
58 | with() | base | evaluate expression in the context of a data frame (without using the “$” operator) |
59 | colnames() | c(".GlobalEnv", "base") | retrieve column names of a data frame |
60 | filter() | c("dplyr", "package:stats") | filter out rows of a data frame according to logical vector |
61 | lag() | c("dplyr", "package:stats") | lag observations by n periods |
62 | glimpse() | c("dplyr", "package:tibble") | |
63 | tibble() | c("dplyr", "package:tidyr", "package:tibble") | |
64 | plot() | c("graphics", "package:base") | Generic function from base R to produce a plot |
65 | cov() | c("pROC", "package:stats") | |
66 | var() | c("pROC", "package:stats") | |
67 | plot_grid() | cowplot | |
68 | theme_cowplot() | cowplot | |
69 | arrange() | dplyr | sort values of data frame according to a variable/combination of varaibles |
70 | full_join() | dplyr | join matching all observations from both data frames |
71 | group_by() | dplyr | group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise |
72 | inner_join() | dplyr | join matching only observations with joining variable in both data frames |
73 | left_join() | dplyr | join matching all observations from the left data frame |
74 | mutate() | dplyr | modify/create a column in a data frame |
75 | n() | dplyr | |
76 | recode() | dplyr | Recode a variable |
77 | select() | dplyr | select columns from a tibble/data frame |
78 | summarise() | dplyr | collapse the dataset to a summary statistic. Usually used with group_by() |
79 | ungroup() | dplyr | |
80 | aes() | ggplot2 | |
81 | coord_flip() | ggplot2 | |
82 | cut_width() | ggplot2 | |
83 | element_blank() | ggplot2 | |
84 | element_line() | ggplot2 | |
85 | element_rect() | ggplot2 | |
86 | element_text() | ggplot2 | Customise text in GGPLOT2 |
87 | facet_grid() | ggplot2 | |
88 | facet_wrap() | ggplot2 | |
89 | geom_bar() | ggplot2 | |
90 | geom_boxplot() | ggplot2 | |
91 | geom_col() | ggplot2 | |
92 | geom_density() | ggplot2 | |
93 | geom_errorbar() | ggplot2 | |
94 | geom_histogram() | ggplot2 | |
95 | geom_hline() | ggplot2 | Add a horizontal line in GGPLOT2 |
96 | geom_line() | ggplot2 | |
97 | geom_point() | ggplot2 | |
98 | geom_smooth() | ggplot2 | |
99 | geom_violin() | ggplot2 | |
100 | geom_vline() | ggplot2 | |
101 | ggplot() | ggplot2 | Create a ggplot graph |
102 | ggsave() | ggplot2 | |
103 | ggtitle() | ggplot2 | |
104 | labs() | ggplot2 | Customise labels in GGPLOT2 |
105 | labs() | ggplot2 | Add a vertical line in GGPLOT2 |
106 | scale_color_discrete() | ggplot2 | |
107 | scale_x_continuous() | ggplot2 | Customise continuous x axis |
108 | scale_y_continuous() | ggplot2 | Customise continuous y axis |
109 | stat_summary() | ggplot2 | |
110 | theme() | ggplot2 | Set theme for GGPLOT2 |
111 | theme_bw() | ggplot2 | |
112 | theme_classic() | ggplot2 | |
113 | theme_grey() | ggplot2 | |
114 | theme_minimal() | ggplot2 | |
115 | theme_set() | ggplot2 | |
116 | ylab() | ggplot2 | |
117 | rgnorm() | gnorm | |
118 | axis() | graphics | |
119 | barplot() | graphics | plot a simple bar plot |
120 | boxplot() | graphics | plot a simple box plot |
121 | hist() | graphics | plot a simple histogram |
122 | legend() | graphics | |
123 | pairs() | graphics | |
124 | par() | graphics | set parameters of the plotting device |
125 | segments() | graphics | |
126 | text() | graphics | |
127 | read_dta() | haven | |
128 | write_dta() | haven | |
129 | auc() | pROC | Calculate area under ROC Curve |
130 | roc() | pROC | Estimate ROC Curve |
131 | col_factor() | readr | specify column type as factor. Used in readr’s functions. |
132 | read_csv() | readr | read tibble from a csv file |
133 | read_delim() | readr | read tibble from a delimited file |
134 | read_excel() | readxl | |
135 | IQR() | stats | obtain the inter-quartile range of a vector |
136 | binomial() | stats | |
137 | complete.cases() | stats | retrieve indices of complete observations |
138 | contrasts() | stats | |
139 | cor() | stats | |
140 | glm() | stats | Estimate a General Linear Model |
141 | lm() | stats | |
142 | median() | stats | |
143 | na.omit() | stats | |
144 | pnorm() | stats | |
145 | predict() | stats | Predict Probability |
146 | pt() | stats | |
147 | quantile() | stats | obtain empirical quantiles of a vector |
148 | relevel() | stats | |
149 | rnorm() | stats | |
150 | sd() | stats | Get standard deviation of a vector |
151 | t.test() | stats | |
152 | is_tibble() | tibble | |
153 | pivot_longer() | tidyr | reshape data wide → long |
154 | pivot_wider() | tidyr | reshape data long → wide |
155 | data() | utils | |
156 | head() | utils | show first 5 rows of a data frame |
157 | head() | utils | print first n (default 5) rows of the data |
158 | read.csv() | utils | read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters |
159 | str() | utils | get the structure of an R object |
160 | write.csv() | utils | write a csv file to a data frame |
Showing 1 to 160 of 160 entries