Chapter 8

Statistical Models with R Regression Analysis Regression is the study of the change of the distribution of one variable, \(y\), according to the value of another variable, \(x\). Both continuous and discrete variables can be included in regression problems. Formally,...

Chapter 7

R Graphics The Graphic Environment R comes with a wide variety of graphical functions. The R default graphics package provide standard R graphics. Additional libraries such as lattice and ggplot provide specialized and often very attractive graphics. This chapter is...

Chapter 6

Using R functions Mathematical Functions The names of the basic functions and mathematical operators in R follow the standards of programming languages. In this paragraph the functions and operators enabling basic mathematical operations to be performed will be dealt...

Chapter 5

Data Import and Export Before all, it is strongly suggested to set the working directory to the directory containing the data. This can be done using the setwd() function > setwd(path\_to\_directory\_containing\_data\_folder) where...

Chapter 4

R Data Objects There are different types of objects in R. The most used are: vectors, matrices, lists, factors, data frames. Vectors In R the simplest data structure is a vector. A vector is defined as an ordered sequence of elements of the same kind. A vector can be...