From 8a7045fb06218a65e4af41253cfada327ffad42e Mon Sep 17 00:00:00 2001
From: Ben Anderson <dataknut@icloud.com>
Date: Tue, 27 Jun 2017 18:07:38 +0100
Subject: [PATCH] added explicit return of dt

---
 mtusFunctions.R | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mtusFunctions.R b/mtusFunctions.R
index 04de207..08b3f09 100644
--- a/mtusFunctions.R
+++ b/mtusFunctions.R
@@ -110,6 +110,7 @@ ba_MTUScreateIds <- function(dt){
   dt <- dt[, ba_pidChar := paste0(survey, swave, msamp, hldid,persid,sep= "_")] # force character
   dt <- dt[, ba_pid := md5(ba_pidChar)] # hash
   dt <- dt[, ba_diarypid := paste0(ba_pid, id, sep= "_")] # force character
+  return(dt)
 }
 
 # # diarypid
@@ -146,7 +147,7 @@ ba_MTUScreateEpisodeStartEndDateTimes <- function(dt){
   # r half hour (includes date)
   dt <- dt[, r_epStartHalfHourDateTime := floor_date(r_epStartDateTime,
                                                      unit ="30 minutes")]
-  
+  return(dt)
 }
 
 ###
@@ -160,7 +161,7 @@ ba_MTUScreateAllEpisodeStartTimesAsString <- function(dt){
                                            dt$st_mins
                                            )
   ]
-  
+  return(dt)
 }
 
 ###
-- 
GitLab