R Exercises – 71-80 – Loops (For Loop, Which Loop, Repeat Loop), If and Ifelse Statements in R

1. Simple ifelse statement Create the data frame ‘student.df’ with the data provided below: Use a simple ‘ifelse’ statement to add a new column ‘male.teen’ to the data frame. This is a boolean column, indicating T if the observation is a male younger than 20 years. 2. Double for loop Write a double for loop which prints 

Continue Reading…

Quality R Training for You