All exercises are done using the basic R functions. (R Core Team (2015))

Exercise 1

x <- 3
y <- 15
x+y
## [1] 18
x-y
## [1] -12
x*y
## [1] 45
x^y
## [1] 14348907
y^x
## [1] 3375

Exercise 2

x <- 2
y <- 3
x^5 > y^4
## [1] FALSE

Exercise 3

vc <- c(22,62,148,43,129)
svc <- sum(vc)
vc/svc
## [1] 0.05445545 0.15346535 0.36633663 0.10643564 0.31930693

Exercise 4

nuc <- c("A","T","C","G")
sort(nuc)
## [1] "A" "C" "G" "T"

REFERENCES

R Core Team. 2015. “R: A Language and Environment for Statistical Computing.” Journal Article. http://www.R-project.org.