OliverKeyes has uploaded a new change for review. https://gerrit.wikimedia.org/r/254863
Change subject: Avoid superfluous warning ...................................................................... Avoid superfluous warning With data.tables you can use setnames(x, y_old, y_new) rather than names(x[y_old])<-y_new which is far more efficient. Most importantly, though, it doesn't shout at you. Change-Id: I22228523bbe4502a19f8312c0208354387dda940 --- M search/LDN.R 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden refs/changes/63/254863/1 diff --git a/search/LDN.R b/search/LDN.R index 2c5bdef..e9be3ce 100644 --- a/search/LDN.R +++ b/search/LDN.R @@ -23,10 +23,12 @@ # Get data and format: data <- query_func(fields = "SELECT * ", date = date, table = table) data$timestamp <- lubridate::ymd_hms(data$timestamp) + # Backwards-compatibility: if ( table == "TestSearchSatisfaction2_14098806" ) { - names(data) <- sub('event_pageViewId', 'event_pageId', names(data)) + setnames(data, "event_pageViewId", "event_pageId") } + # Treat each individual search session as its own thing, rather than belonging # to a set of other search sessions by the same user. page_visits <- ddply(data, .(event_searchSessionId, event_pageId), -- To view, visit https://gerrit.wikimedia.org/r/254863 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22228523bbe4502a19f8312c0208354387dda940 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/golden Gerrit-Branch: master Gerrit-Owner: OliverKeyes <oke...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits