Swirl-R2 Flashcards
square roor
sqrt()
kada podelimo vec3 sa vec3
dobijemo vec3 u kom se prvi el prvog vektora deli sa prvim elementom drugog drugi sa drugim trci sa trecim
x
function to get arguments of a function
args()
dir.create(file.path(“folder1”,”folder2”),recursive=TRUE)
WHAT DOES IT DO
it creates two folders with folder 2 nested inside folder 1
delete a directoery
unlink(“folder2”,recursive=TRUE)
? for operators
?’:’
we use sequence to set increment which cannot be done in :
seq(0,10,by=0.5)
we can also set the length of the vector for example between 5 and 4 of length 10
seg(5,4,length=10)
if we want to create a vector of 40 zeros
rep(0,times=40) or rep(9,40)
rep(c(0,1,2),each=10) what does it do
00000000001111111111222222222
vectors can be represented in atomic v and lists
atomic has only one data type while list has many
if we have a char vec
paste(vec,collapse=” “)
join two words
pastre(word1,word2,sep=” “)
y
fin
x[is.na(x)]
we get all NAs
y