LAB - R 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/42

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:13 AM on 3/20/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

43 Terms

1
New cards

c()

Combines values into a vector

2
New cards

dim()

Finds dimension of an object

3
New cards

head()

Returns the first part of a vector, matrix, table, data frame, or function

4
New cards

length()

Finds length of vector

5
New cards

names()

Find the names of the variables in a data frame

6
New cards

max()

Finds the maximum of the input values

7
New cards

min()

Finds the minimum of the input values

8
New cards

mean()

Finds the mean of the input values

9
New cards

read.csv()

Reads a file in table format and creates a data frame from it

10
New cards

sum()

Finds the sum of the input values

11
New cards

View()

View data frame in a spreadsheet-style format

12
New cards

Vector

Is an ordered collection of numbers, words, and generally ‘objects’ in R. Use c() function

13
New cards

Why is it important to add comments

Helps clarify code to person reading it; use the # symbol

14
New cards

hist()

Creates a histogram

15
New cards

par()

Sets graphics parameters

16
New cards

par(mfrow)

Sets the mfrow graphics parameter to control the layout of subplots in a graph

17
New cards

barplot()

makes a bar graph

18
New cards

table()

Tabulates counts of categorical data

19
New cards

subset()

Selects subset of vectors, matrices, or dataframes that meet certain consitions

20
New cards

prop.table()

Tabulates proportion of occurrence of categorical data

21
New cards

data.frame()

Creates a data frame

22
New cards

boxplot(y ~ x)

Make a boxplot of the distribution of the numerical variable y, grouped by the levels of the categorical variable, x

23
New cards

tapply (y, x, FUN=f)

Split the data y into subsets according to the grouping x variables, computes summary statistics f for each

24
New cards

View()

Views a data frame in the script window

25
New cards
26
New cards

mean()

Calculates the average for a numerical vector

27
New cards

median()

Calculates the median for a numerical vector

28
New cards

sd()

Calculates the standard deviation for a numerical vector

29
New cards

plot(x,y)

plots a graph, where x is the independent variable and y is the dependent variable. If you don’t specify the type, it only plots points

30
New cards

For plot(x,y), type = “l”

gives line graph without showing dots

31
New cards

For plot(x,y), type = “o”

gives line graph with both showing dots and lines

32
New cards

table()

Creates a table of counts

33
New cards

prop.table()

Creates a table of proportions

34
New cards

dbinom()

Calculates a binomial probability

35
New cards

pbinom()

Calculates a cumulative binomial probability

36
New cards

round(,)

Rounds the values in its first argument to the specified number of decimal places (default 0)

37
New cards

chisq.test()

Performs a chi square test

38
New cards

spineplot()

Creates a mosaic plot

39
New cards

t()

Transposes a matrix

40
New cards

dpois(count, lambda)

Density value for the Poisson distribution with mean

41
New cards

pchisq(q,df)

Cumulative distribution dunction for the chi-squared distribution with df degrees of freedom

42
New cards

sum(x)

Computes the sum of all the values present in its argument x

43
New cards

qchisq(p,df)

Quantile function for the chi-squared distribution with df degrees of freedom

Explore top notes

note
UNIT 3 APUSH
Updated 521d ago
0.0(0)
note
2.1 Population Distribution Notes
Updated 1174d ago
0.0(0)
note
Unit 1 notes LT 2: Lab Terms
Updated 1275d ago
0.0(0)
note
Operations Management
Updated 840d ago
0.0(0)
note
第一课 你周末有什么打算
Updated 1160d ago
0.0(0)
note
4.4-4.7 Presentation
Updated 109d ago
0.0(0)
note
UNIT 3 APUSH
Updated 521d ago
0.0(0)
note
2.1 Population Distribution Notes
Updated 1174d ago
0.0(0)
note
Unit 1 notes LT 2: Lab Terms
Updated 1275d ago
0.0(0)
note
Operations Management
Updated 840d ago
0.0(0)
note
第一课 你周末有什么打算
Updated 1160d ago
0.0(0)
note
4.4-4.7 Presentation
Updated 109d ago
0.0(0)

Explore top flashcards

flashcards
OS - teória
60
Updated 439d ago
0.0(0)
flashcards
7th Grade STAAR Vocabulary
56
Updated 351d ago
0.0(0)
flashcards
voc11
34
Updated 833d ago
0.0(0)
flashcards
Envol 5 - Unité 7
46
Updated 983d ago
0.0(0)
flashcards
BJU Physical Science Chapter 2
23
Updated 528d ago
0.0(0)
flashcards
Mandarin 3 Semester 1 Final
244
Updated 829d ago
0.0(0)
flashcards
OS - teória
60
Updated 439d ago
0.0(0)
flashcards
7th Grade STAAR Vocabulary
56
Updated 351d ago
0.0(0)
flashcards
voc11
34
Updated 833d ago
0.0(0)
flashcards
Envol 5 - Unité 7
46
Updated 983d ago
0.0(0)
flashcards
BJU Physical Science Chapter 2
23
Updated 528d ago
0.0(0)
flashcards
Mandarin 3 Semester 1 Final
244
Updated 829d ago
0.0(0)