Intro To R Flashcards

1
Q

What is an algorithm

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

What is pseudo code

A

Word that is cutout is perform*

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

What are the different variable types

A

Information is stored as variables

(Cut off) Boolean*

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

What are vectors

A

A vector is a list of variables
Same data type
One dimensional

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

What is a matrix

A

Is a collection of elements of the same data type arranged into a fixed number of towns and columns
2 dimensional

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

What is an array

A

Is an object that can hold two or more than 2 dimensional data

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

What are data frames

A

2 dimensional
Rectangular
Used to store values of any data tye

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

What is R syntax

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

how do you assign a variable

A

using <-
e.g a <- 4
this would store 4 as a variable of a
a is the name of the variable

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

how do you times two variables

A

variable * variable
e.g a * a

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

how would you square root a variable

A

sqrt(variable name)

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

how would you store a concatentation under a vector

A

variable name <- c( )

e.g v <- c(0, 1, 2, 3, 4)

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

what does # mean

A

any text after # is ignored
is used for commenting

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

what is concatenation

A

c()(concatenate) is one of the most commonly used R functions because it is the default method for combining multiple arguments into a vector

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

how can you check if something is a vector

A

is.vector(v)

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

how do you find the mean of your vector

A

mean(v)

17
Q

what is a vector

A

vector is like a single column or row in a spreadsheet

18
Q

what are the different operations that can be carried out on vectors

A

var(v) - variance
median(v) - median
sum(v) - sum of all elements
prod(v +1) - multiply
length(v)- how many elements are in the vector

19
Q
A