#Calculate the bounce rate in the provided dataset.
#Load, convert timestamps to seconds, split
data("session_dataset")
session_dataset$timestamp <- to_seconds(x = session_dataset$timestamp, format = "%Y%m%d%H%M%S")
events_by_user <- split(session_dataset$timestamp, session_dataset$UUID)
#Sessionise and calculate bounce rate
sessions <- reconstruct_sessions(events_by_user)
bounce_rate(sessions)
#[1]58
Run the code above in your browser using DataLab