1. Write R script to perform the following simple tasks
- Assign the list of numbers c(1,3,4,6,7,9,50,100,-20) to an R object entitled my.list
- Find the mean, standard deviation, and range (maximum and minimum) of the list
- Create a second list called my.list2 whose elements are TRUE if the corresponding element of my.list is>25 and FALSE otherwise.
- Convert my.list to a matrix called my.list.mat with 3 rows and 3 columns
6 7 9
50 100 -20
2. Write a user defined function that
- Takes as input a list
- Sums the absolute values of the numbers of the list
- Returns the sum as a result
- Show that the function works by giving it my.list as input