# QuickAnalysis.r name rows cols keys 1: DB.iradio.event 22179572 13 2: DB.iradio.customer 14487506 6 3: DB.iradio.station 1436927 6 4: DB.iradio.content 1208702 13 5: MetricScale 14 5 pref .us() DBs <- c("DB.iradio.event", "DB.iradio.customer", "DB.iradio.station", "DB.iradio.content") DB2 <- DBs[!sapply(DBs, exists)] loadFromJesus(DB2) setkey(DB.iradio.event, apple_identifier, download_date) setkey(DB.iradio.content, apple_identifier, download_date) DB.iradio.event[, `:=`(end_reason = factor(end_reason, levels=0:2, labels=c("Natural", "Skipped", "Other") , event_type = factor(event_type, levels=1:6, labels=c("Played", "2 (undefined)", "Liked", "Banned", "Wished", "Unwished") )] posixCols <- c("event_start_time", "event_end_time") DB. saveImageTo() character : apple_identifier, device_type, track_ownership, storefront_name, filename integer : event_type, end_reason numeric : event_start_time, event_end_time, customer_identifier, station_id Date : download_date POSIXct : ingestion_time character : postal_code, user_type, filename numeric : customer_identifier Date : download_date POSIXct : ingestion_time character : station_type, station_name, filename numeric : station_id Date : download_date POSIXct : ingestion_time character : apple_identifier, artist, title, label, isrc, vendor_identifier, vendor_offer_code, extracted_upc, extracted_isrc, filename numeric : extracted_upc_long Date : download_date POSIXct : ingestion_time ############## end reason device type DB.test <- {set.seed(11); copy(DB.iradio.event[sample(apple_identifier, 15)])} DB.test[, duration := event_end_time - event_start_time] DB.test DB.iradio.event[, duration := event_end_time - event_start_time] jesusForData(DB.iradio.event)