In this set of exercises we shall follow the practice of conducting an experimental study. Researcher wants to see if there is any influence of working-out on body mass. Three groups of subjects with similar food and sport habits were included in the experiment. Each group was subjected to a different set of exercises. Body […]

## Experimental Design Solutions

Below are the solutions to these exercises on Experimental design exercises #################### # # # Exercise 1 # # # #################### data <- read.csv("experimental-design.csv") as.factor(data$group) -> data$group as.factor(data$age) -> data$age summary(data$initial_mass) ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 53.50 62.18 68.90 67.70 72.27 86.00 summary(data$final_mass) ## Min. 1st Qu. Median Mean 3rd […]

## Data Structures Exercises

There are 5 important basic data structures in R: vector, matrix, array, list and dataframe. They can be 1-dimensional (vector and list), 2-dimensional (matrix and data frame) or multidimensional (array). They also differ according to homogeneity of elements they can contain: while all elements contained in vector, matrix and array must be of the same […]

## Data Structures Solutions

Below are the solutions to these exercises on data structures. #################### # # # Exercise 1 # # # #################### v <- sample(-100:100, 10, replace=TRUE) #################### # # # Exercise 2 # # # #################### a <- array(seq(from = 26, length.out = 25, by = 2), c(5, 5)) s <- LETTERS[match("C", LETTERS):(match("C", LETTERS)+19)] #################### # […]

## Protected: Student’s Achievement Research Project – Exercises

There is no excerpt because this is a protected post.

## Protected: Student’s Achievement Research Project – Solutions

There is no excerpt because this is a protected post.

## String Manipulation – Exercises

In this set of exercises we will practice functions that enable us to manipulate strings.You can find more about string manipulation functions in Handling and Processing Strings in R e-book. Answers to the exercises are available here. If you have different solution, feel free to post it. Exercise 1 Load text from the file and […]

## String Manipulation – Solutions

Below are the solutions to these exercises on functions that are used to manipulate strings. #################### # # # Exercise 1 # # # #################### gambler <- readLines("http://www.r-exercises.com/wp-content/uploads/2016/11/gambler.txt") noquote(gambler) ## [1] At length I returned from two weeks leave of absence to find that my patrons had arrived three days ago in Roulettenberg. I received […]

## Nonparametric Tests Exercises

In this set of exercises you will be presented with real-life problems in marketing. Your task will be to choose appropriate nonparametric statistical technique and solve the problem using appropriate R functions. Answers to the exercises are available here. Exercise 1 A company wants to learn if sales income is equaly distributed among the stores. […]

## Nonparametric Tests Solutions

Below are the solutions to these exercises on nonparametric tests. #################### # # # Exercise 1 # # # #################### # Chi-square goodness of fit # H0: f1=f2=f3=f4=f5=f6=f7=f8 # H1: f1!=f2 chisq.test(c(102, 300, 102, 100, 205, 105, 71, 92)) ## ## Chi-squared test for given probabilities ## ## data: c(102, 300, 102, 100, 205, 105, […]