Swirl-R2 Flashcards

1
Q

square roor

A

sqrt()

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

kada podelimo vec3 sa vec3

A

dobijemo vec3 u kom se prvi el prvog vektora deli sa prvim elementom drugog drugi sa drugim trci sa trecim

x

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

function to get arguments of a function

A

args()

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

dir.create(file.path(“folder1”,”folder2”),recursive=TRUE)

WHAT DOES IT DO

A

it creates two folders with folder 2 nested inside folder 1

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

delete a directoery

A

unlink(“folder2”,recursive=TRUE)

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

? for operators

A

?’:’

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

we use sequence to set increment which cannot be done in :

A

seq(0,10,by=0.5)

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

we can also set the length of the vector for example between 5 and 4 of length 10

A

seg(5,4,length=10)

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

if we want to create a vector of 40 zeros

A

rep(0,times=40) or rep(9,40)

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

rep(c(0,1,2),each=10) what does it do

A

00000000001111111111222222222

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

vectors can be represented in atomic v and lists

A

atomic has only one data type while list has many

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

if we have a char vec

A

paste(vec,collapse=” “)

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

join two words

A

pastre(word1,word2,sep=” “)

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

y

A

fin

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

x[is.na(x)]

A

we get all NAs

y

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

x[!is.na(x) & x>0]

A

all positive values that are not NAs

17
Q

base (vector) indexing in R

A

one-based-indexing

18
Q

x[c(-2, -10)]

A

all the elements of x except the 2nd and the 10th

or x[c(-2, -10)] exact same result

19
Q

stigla sam do matrices

A

ok