What does the graphic tell?
A plot can be very useful to explore the relationship between two variables. If you pass the plot()
function two arguments, the first one will be plotted on the x-axis, the second one will be plotted on the y-axis.
The sugar trading data is again available at https://assets.datacamp.com/production/course_1478/datasets/trade.dta.
After you've imported the data frame, you should plot two of its variables, Import
against Weight_I
, and describe their relationship! haven
is already loaded in your R session, so you can start importing straight away.
Cet exercice fait partie du cours
Intermediate Importing Data in R
Exercice interactif pratique
Passez de la théorie à la pratique avec l’un de nos exercices interactifs
