Coding Commands

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:57 PM on 10/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

!

Equivalent to not

2
New cards

[]

Selects specific items in the dataset

3
New cards

Where is rows and columns in []

[row, column]

4
New cards

exclude = NULL

Separates NA into their own category

5
New cards

dim()

Shows the number rows then columns

6
New cards

nrow()

Tells you the number of rows

7
New cards

data.frame()

Puts variables into a data set

8
New cards

select()

Picks columns

9
New cards

filter()

Picks rows

10
New cards

level()

Shows the categories for vairables labelled factors

11
New cards

table()

Counts the number of observations for each unique category

12
New cards

colSums()

Sums up the values in each column

13
New cards

ggplot(penguins, aes(x=flipper, y=body)) +

geom_point(color = “blue”, alpha = 0.6))

Makes every point blue

14
New cards

ggplot(penguins, aes(x=flipper, y=body))+

geom_point(aes(color = “blue”))

Creates a legend with the word blue

15
New cards

If alpha is placed inside aes()

Legend is made, and chracteristics not applied because it assumes it’s a variable

16
New cards

If alpha or colour is placed outside aes()

No legend is made, and characteristics applied

17
New cards

facet_wrap(~variable)

Adds multiple separate graphs with the same axis

<p>Adds multiple separate graphs with the same axis</p>
18
New cards

face_grid(variable~variable)

Creates a grid of graphs between two variables

19
New cards

cor(x,y)

Finds pearson’s correlation

20
New cards

lm(y~x)

Predicts linear mnodel

21
New cards

sample()

Randomly picks numbers`

22
New cards

function()

Named chunk of code that can be ran

23
New cards

quantile(c(lower, upper))

Finds intervals

24
New cards

pnorm()

Gives area under the standard normal curve below z (you put in a z score)

25
New cards

qnorm()

Gives z scores for an area (you put in an area and get a z score)