Version with data table instead of dataframes