1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Defensive R Programming

Connected

अभ्यास

The Conflicted Package

Great package authors think alike. This means they often come up with the same function name. In base R, there is a function called lag() that is used in time-series. In the dplyr package, a similarly named function used to next values in a vector.

You are going to use the conflicted package to handle this issue.

निर्देश

100 XP
  • Load the dplyr and conflicted packages.
  • Use conflict_prefer() to select the dplyr version of lag().
  • Test the lag() function and verify it gives the expected output. This has been done for you.