Question
Task 1 Please create two data frames according to the following two tables Table 1-> classroom_capacity Classroom_id Capacity 1 23 2 25 4 20 Table
Task 1
Please create two data frames according to the following two tables
Table 1->classroom_capacity
Classroom_id | Capacity |
1 | 23 |
2 | 25 |
4 | 20 |
Table 2-> classroom_size
Classroom_id | size |
1 | 900 |
2 | 800 |
3 | 850 |
Task 2
Please do an inner join for these two tables. Call the result data frame df1.
Task 3
Please do an outter join for these two tables, while keeping all the classroom_id in the classroom_capacitytable. Call the result data frame df2.
Task 4
Extract the capacity column from the classroom_capacitydata frame and call it mydata, then calculate the mean capacity using R programming
Task 5
Please define a data frame as the following. df=data.frame(
name=letters[1:5],
age=c(9,130,-2,3,15)
)
Now for invalid age input (either greater than 100 or smaller than 0), please replace them with a text string invalid.
Hint: you will need logical subscripting for the data frame.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started