Packages/plots Flashcards

1
Q

Install packages?

A

install.packages(“”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Confirmation message of loading the package/load installed package?

A

require()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

No confirmation message but load package?

A

library()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Loading many packages simultaneously with pacman?

A

pacman : : o_load()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Clean up a package with pacman?

A

p_unload()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Clean up base packages?

A

detach (“”, unload = TRUE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Get help in something?

A

?function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Plotting on a specific categorical variable?

A

plot(dataset$Var)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Plotting a quantitative variable?

A

plot(dataset$Var.Var)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Plot with two variables?

A

plot(dataset$Var, dataset$Var)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Plot the entire dataset?

A

plot(dataset)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Plotting mathematical formulas?

A

plot(function, min, max)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Bar plot?

A

barplot(

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Histogram?

A

hist(dataset)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Put graphs in x rows and y columns?

A

par(mfrow = c(x, y))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Histogram with a selector (restriction)?

A

hist(dataset$Var [dataset$var == “var”])

17
Q

What returns the first or last parts of a vector, matrix, table, data frame or function?

A

head()

18
Q

How to figure out class or data type for each column?

A

sapply(data, class)

19
Q

how to make a table in R a database?

A

attach(var)

20
Q

Reading text file in R?

A

read.table(“filename.txt”)

21
Q
A