Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

Trying to calculate retention rate in R, how to divide one row by another with the same date and then apply same logic across entire data frame?

$
0
0

I am attempting to calculate retention rate of an Instagram story (# of viewers on the last frame divided by # viewers on first frame) within the same date. I have this data within a data frame in R where each frame is listed as a a row and any frame with the same date makes up the entire story for that date. I am having a hard time figuring out how to obtain the index of the first and last frame within the same date and then dividing them and then applying this to the rest of the data frame? Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 201945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>