Paraphrasing a sequence
Exercise Type: Paraphrasing
Paraphrasing sequences
Take a look at this clunky bit of code:
start <- 4
end <- -9
n <- end-start
a <- start
count <- 1
while(count <=abs(n)){
a <- c(a, start- count)
count <- count +1
}
Part 1
Use the 1seq()
function to recreate the a
vector!
Part 2
Use the colon operator (:
) to recreate the a
vector!