0% found this document useful (0 votes)
15 views1 page

TP3 Introduction A R 2024-2025 (Homework) EN

Tp introduction à R

Uploaded by

bryannlend2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

TP3 Introduction A R 2024-2025 (Homework) EN

Tp introduction à R

Uploaded by

bryannlend2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

National Higher Polytechnic School of Douala Academic year : 2024-2025

Specialization : SDIA Level : 3


Subject : Introduction to R Duration : At home

All your work will be sent through a TP3.R script file. Make sure you display the results
of all your commands.

PRACTICAL WORK N°3

PART 1
1. Display the content of the data frame flights of the nycflights13 pa-
ckage.
2. What is that data frame about ?
3. Name the five (05) dplyr key functions.
4. Display all flights that departed on February 13th.
5. Display all flights that departed in December or January.
6. Display flights that weren’t delayed (on arrival or departure) by more than
an hour.
7. Rewrite the previous script using De Morgan’s law.
8. How many flights have a missing dep_time ? What other variables are mis-
sing ? What might these rows represent ?
9. What does the following script do ?
arrange(flights, desc(arr_delay))
10. What does the following script do ?
transmute(flights, dep_time, hour = dep_time %/% 100,
minute = dep_time %% 100)

PART 2
1. What time of day should you fly if you want to avoid delays as much as
possible ?
2. For each destination, compute the total minutes of delay.
3. For each flight, compute the proportion of the total delay for its destina-
tion.
4. Find all destinations that are flown by at least two carriers. Use that infor-
mation to rank the carriers.
5. Which plane (tailnum) has the worst on-time record ?

You might also like