Question: Using R programming language only answer 4 and 5 1. Create the following vectors, populated with information about the courses for which you are enrolled

Using R programming language only answer 4 and 5
1. Create the following vectors, populated with information about the courses for which you are enrolled this year in addition to one course (any course) that you are not enrolled. - courseNum: course number of each course - coursename: course name of each course - courseProf: name of the instructor for each course - enrolled: a logical vector indicating whether or not you are enrolled in the course - anticipatedGrade: your anticipated letter grade in each course, with an NA for any course for which you are not enrolled - anticipatedHours: your anticipated hours spent on each class per week based on on your experience so far, with an NA for any course for which you are not enrolled. 2. Create and print a data frame called MyCourseDataFrame by combining all of the above vectors. Assign the names of each column to be the names of the original vectors. Summarize the type of each column. Do the data frame variables retain their original classes? Formally test this using appropriate R code. 3. Combine the vectors from (1) into a list called MyCourseDataList, where each vector is an element of the list. Assign the names of each element to be the names of the original vectors. Do the elements of the list maintain their original classes? Formally test this using appropriate R code. 4. Write code that returns the following values in code chunks using 'echo = TRUE' so that your code as well as your output is displayed after each calculation: - The values in courseNum, excluding the fourth value - The total number of hours you anticipate spending on coursework, both per week, and on average number of hours you anticipate spending for these courses. - A data frame with only the third row and first two columns of myCourseDataFrame - The first value in the second element of MyCourseDataList 5. Convert the anticipatedGrade variable in MyCourseDataFrame into a factor using the function factor (). Note: to get an ordering of values, you'll have to use the argument is.ordered = TRUE. Look at the documentation of factor() to understand how to do this. Now write code to answer the following questions, and output the answers. (a) What is the maximum letter grade you anticipate receiving this semester? (b) What is the minimum number of hours you expect to work per week in a class this semester? Is this in this course? (c) For (a) and (b), what is the name and course number of each class? Your code should provide the result as a single textual output with both course number and course name separated by a colon, The data can be filled in at will, I want to know if I do this type of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
