ST308 Vocab/Codes

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

1/35

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:28 AM on 9/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

36 Terms

1
New cards

=  or  <-

used to assign something to a variable or object name

2
New cards

#

Use to add comments to your code (this is extremely useful, especially when you are first learning a coding language.

3
New cards

str()

provides the structure of an object, meaning it will show the object’s value as well as its class

4
New cards

c()

stands for concatenate or combine, this combines objects to form a vector

5
New cards

$

allows you to access the different columns within a data frame

6
New cards

-

removes whatever you put after it from the object

7
New cards

:

allows you to access a sequence of entries from an object

8
New cards

head()

displays the first 6 rows of a data set

9
New cards

[ ]

this is the notion used to index elements in a list

10
New cards

vectorname[#]

use to access elements in a certain position for a vector

11
New cards

Data Frames

allows you to combine multiple vectors together and create a data frame with a certain number of rows and columns

12
New cards

datasetname[#,#]

because data frames possess two dimensions, you must use at least two values separated by a comma to pull specific entries; [rows,columns]

13
New cards

seq()

allows you to make a vector that follows a certain pattern from a starting point

14
New cards

rep()

this can be used to repeat a vector, a number, or just an object a certain number of times

15
New cards

data.frame()

allows you to combine multiple vectors and create a data frame with a certain number of rows and columns

16
New cards

+

This is the notion in R for addition, which can be used to add two vectors together or add a number to a vector.

17
New cards

^

exponentiation operator, it is used to raise a number to a power

18
New cards

*

this is the notion in R for multiplication, can be used to multiply a number to a vector

19
New cards

The console

Bottom-left corner, where code is run. Generally, don’t write much code here because the code is not saved for later use.

20
New cards

The environmental pane

Top-right corner, find objects you have made and their values and properties (structure).

21
New cards

Broom

In the environment, it is very important. clicking the icon will sweep away all your objects and get rid of them forever.

22
New cards

File/Help Pane

Bottom-right corner, files, where plots will pop up when code is ran, where list of installed packages will be, help on functions when writing codes.

23
New cards

The Script

Top-left corner. Where we spend most of our time. Where we write code because it saves, send code to the console.

24
New cards

list()

joins objects into a list

25
New cards

Objects

Data structure with attributes: things that take values.

26
New cards

Classes

The types of objects and determine how the objects’ values are saved.

27
New cards

Strings vector

Text vector, character

28
New cards

What are comments for?

Are used to explain what a line of code is doing, either to remind yourself for later or to tell someone else what your code is doing if you are sending your code.

29
New cards

data[2]

This is accessing the element in the 2nd position in the data vector

30
New cards

data[c(1,4,6)]

This allows you to access more than one element in a given position in the data vector that is not in a sequence. So, in this case, the numbers in the 1st, 4th, and 6th positions.

31
New cards

data[-c(2,3,5,7)]

This is using the negative sign and the c() function which means we are removing more than one element that is not a sequence. So, for this part, the elements in the 2nd, 3rd, 5th, and 7th elements are removed.

32
New cards

typeof()

outputs the type of variable that the object is

33
New cards

Collection

A group of things that we’re considering all together. The objects inside my grocery cart, for example. form a collection. The students in the class form a collection.

34
New cards

Elements

things inside of a collection. grocery collection has eggs, lettuce, milk which are all elements.

35
New cards

Homogeneous

every element into the same category. Homogenous diet.

36
New cards

Heterogeneous

Elements can fall into different categories. Varied diet.