Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 - more dplyr I have uploaded a data set called dr 4 . Rdata. It contains the dates that fictional users visited a
Part more dplyr
I have uploaded a data set called dr Rdata. It contains the dates that fictional users visited a fictional website. The
website is able to track if the same user visited the site more than once. For the particular date range, the site had
visitors, and of them visited more than once. Some of them people visited the site times.
Using dplyr find the average time between repeated visits to the site.
You will want to find the total average.
Be careful when calculating this.
For example, the first user to visit the site more than once row YPELGRZNOQUTNPOH visited on
and The time difference for the repeated visits are: days, days, and days, respectively, for an average
of days.
The next user with repeated visits is row SNTCUXUDIHCCSPJA This person visited on and a
difference of days.
If your data set had only these two rows, the average time between visits would be
days. It is not days.
When I first attempted this, I used filter mutate rowwise ungroup and summarise Upon further
review, I realized that it is entirely possible to complete this task using only filter and mutate commands. I
do not care what combination of commands you use. I do care that you get the correct final result.
Make sure your final output shows the desired average number of days between visits.
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