Running ‘testthat.R’ [17s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(lifelogr)
  > 
  > test_check("lifelogr")
  1. Error: can create Person object with other info fields (@test_person.R#6) ---
  CCTZ: Unrecognized tzone: "GB"
  1: expect_is(Person$new(user_info = list(name = "NN", workdays = list("Tues", "Sat"), 
         fav_color = "purple"), start_date = "2017-03-11", end_date = "2017-03-12"), "Person") at testthat/test_person.R:6
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: Person$new(user_info = list(name = "NN", workdays = list("Tues", "Sat"), fav_color = "purple"), 
         start_date = "2017-03-11", end_date = "2017-03-12")
  5: .subset2(public_bind_env, "initialize")(...)
  6: private$create_util_data(self$start_date, self$end_date)
  7: lubridate::make_datetime(year = lubridate::year(df$date), month = lubridate::month(df$date), 
         day = lubridate::day(df$date), hour = 0L, min = 0L, sec = 0, tz = Sys.timezone())
  8: C_update_dt(.rep_maybe(origin, N), year = .rep_maybe(year, N), month = .rep_maybe(month, 
         N), yday = integer(), mday = .rep_maybe(day, N), wday = integer(), hour = .rep_maybe(hour, 
         N), minute = .rep_maybe(min, N), second = .rep_maybe(sec, N), tz = tz)
  
  2. Error: can load in additional data as dataframe (@test_person.R#22) ---------
  CCTZ: Unrecognized tzone: "GB"
  1: expect_is(Person$new(addl_data = data.frame(NA), start_date = "2017-03-11", end_date = "2017-03-12"), 
         "Person") at testthat/test_person.R:22
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: Person$new(addl_data = data.frame(NA), start_date = "2017-03-11", end_date = "2017-03-12")
  5: .subset2(public_bind_env, "initialize")(...)
  6: private$create_util_data(self$start_date, self$end_date)
  7: lubridate::make_datetime(year = lubridate::year(df$date), month = lubridate::month(df$date), 
         day = lubridate::day(df$date), hour = 0L, min = 0L, sec = 0, tz = Sys.timezone())
  8: C_update_dt(.rep_maybe(origin, N), year = .rep_maybe(year, N), month = .rep_maybe(month, 
         N), yday = integer(), mday = .rep_maybe(day, N), wday = integer(), hour = .rep_maybe(hour, 
         N), minute = .rep_maybe(min, N), second = .rep_maybe(sec, N), tz = tz)
  
  3. Error: can load in list of dataframe grouping assignments (@test_person.R#33) 
  CCTZ: Unrecognized tzone: "GB"
  1: expect_is(Person$new(group_assignments = list(group_months = data.frame(month = c("Jan", 
         "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"), 
         group = c(0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0)), data.frame(NA))), "Person") at testthat/test_person.R:33
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: Person$new(group_assignments = list(group_months = data.frame(month = c("Jan", "Feb", 
         "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"), group = c(0, 
         0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0)), data.frame(NA)))
  5: .subset2(public_bind_env, "initialize")(...)
  6: private$create_util_data(self$start_date, self$end_date)
  7: lubridate::make_datetime(year = lubridate::year(df$date), month = lubridate::month(df$date), 
         day = lubridate::day(df$date), hour = 0L, min = 0L, sec = 0, tz = Sys.timezone())
  8: C_update_dt(.rep_maybe(origin, N), year = .rep_maybe(year, N), month = .rep_maybe(month, 
         N), yday = integer(), mday = .rep_maybe(day, N), wday = integer(), hour = .rep_maybe(hour, 
         N), minute = .rep_maybe(min, N), second = .rep_maybe(sec, N), tz = tz)
  
  4. Error: no error when creating Person object with no start and end date (@test_person.R#47) 
  CCTZ: Unrecognized tzone: "GB"
  1: expect_is(Person$new(user_info = list(name = "NN", workdays = list("Tues", "Sat"), 
         fav_color = "purple")), "Person") at testthat/test_person.R:47
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: Person$new(user_info = list(name = "NN", workdays = list("Tues", "Sat"), fav_color = "purple"))
  5: .subset2(public_bind_env, "initialize")(...)
  6: private$create_util_data(self$start_date, self$end_date)
  7: lubridate::make_datetime(year = lubridate::year(df$date), month = lubridate::month(df$date), 
         day = lubridate::day(df$date), hour = 0L, min = 0L, sec = 0, tz = Sys.timezone())
  8: C_update_dt(.rep_maybe(origin, N), year = .rep_maybe(year, N), month = .rep_maybe(month, 
         N), yday = integer(), mday = .rep_maybe(day, N), wday = integer(), hour = .rep_maybe(hour, 
         N), minute = .rep_maybe(min, N), second = .rep_maybe(sec, N), tz = tz)
  
  5. Error: no error when creating empty Person object (@test_person.R#54) -------
  CCTZ: Unrecognized tzone: "GB"
  1: expect_is(Person$new(), "Person") at testthat/test_person.R:54
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: Person$new()
  5: .subset2(public_bind_env, "initialize")(...)
  6: private$create_util_data(self$start_date, self$end_date)
  7: lubridate::make_datetime(year = lubridate::year(df$date), month = lubridate::month(df$date), 
         day = lubridate::day(df$date), hour = 0L, min = 0L, sec = 0, tz = Sys.timezone())
  8: C_update_dt(.rep_maybe(origin, N), year = .rep_maybe(year, N), month = .rep_maybe(month, 
         N), yday = integer(), mday = .rep_maybe(day, N), wday = integer(), hour = .rep_maybe(hour, 
         N), minute = .rep_maybe(min, N), second = .rep_maybe(sec, N), tz = tz)
  
  6. Error: plot_i_hr_datetime produces a ggplot object (@test_viz_plot.R#73) ----
  Invalid timezone of input vector: "GB"
  1: expect_is(plot_i_hr_datetime(EX), "ggplot") at testthat/test_viz_plot.R:73
  2: klass(object)
  3: paste(class(x), collapse = "/")
  4: plot_i_hr_datetime(EX)
  5: ggplot2::annotate("rect", xmin = rep(as.POSIXct(person$start_date), 3), xmax = rep(as.POSIXct(person$end_date) + 
         lubridate::days(1), 3), ymin = c(hr_zones$fat_burn[1], hr_zones$fat_burn[2], 
         hr_zones$cardio[2]), ymax = c(hr_zones$fat_burn[2], hr_zones$cardio[2], hr_zones$peak[2]), 
         fill = c("orange", "green", "blue"), alpha = 0.25)
  6: compact(list(x = x, xmin = xmin, xmax = xmax, xend = xend, y = y, ymin = ymin, ymax = ymax, 
         yend = yend))
  7: vapply(x, is.null, logical(1))
  8: as.POSIXct(person$end_date) + lubridate::days(1)
  9: as.POSIXct(person$end_date) + lubridate::days(1)
  10: add_period_to_date(e2, e1)
  11: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  12: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  13: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  14: (function (object, years = integer(), months = integer(), days = integer(), mdays = integer(), 
         ydays = integer(), wdays = integer(), hours = integer(), minutes = integer(), 
         seconds = double(), tzs = NULL, roll = FALSE, week_start = 7) 
     {
         if (!length(object)) 
             return(object)
         if (length(days) > 0) 
             mdays = days
         updates <- list(year = years, month = months, yday = ydays, mday = mdays, wday = wdays, 
             hour = hours, minute = minutes, second = seconds)
         maxlen <- max(unlist(lapply(updates, length)))
         if (maxlen > 1) {
             for (nm in names(updates)) {
                 len <- length(updates[[nm]])
                 if (len != maxlen && len > 1) 
                     updates[[nm]] <- rep_len(updates[[nm]], maxlen)
             }
         }
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- if (is.null(tzs)) 
             tz(object)
         else tzs
         updates[["week_start"]] <- week_start
         reclass_date(do.call(C_update_dt, updates), object)
     })(structure(list(sec = 0, min = 0L, hour = 0L, mday = 17L, mon = 1, year = 117L, 
         wday = 5L, yday = 47L, isdst = 0L, zone = "GMT", gmtoff = 0L), .Names = c("sec", 
     "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", 
     "POSIXt"), tzone = c("GB", "GMT", "BST")), roll = FALSE, week_start = 7, days = 18, 
         hours = 0, minutes = 0, seconds = 0)
  15: reclass_date(do.call(C_update_dt, updates), object)
  16: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  17: as.POSIXlt(new)
  18: do.call(C_update_dt, updates)
  19: (function (dt, year, month, yday, mday, wday, hour, minute, second, tz = NULL, roll = FALSE, 
         week_start = 7L) 
     {
         .Call(`_lubridate_C_update_dt`, dt, year, month, yday, mday, wday, hour, minute, 
             second, tz, roll, week_start)
     })(year = integer(0), month = integer(0), yday = integer(0), mday = 18, wday = integer(0), 
         hour = 0, minute = 0, second = 0, dt = structure(1487289600, class = c("POSIXct", 
         "POSIXt"), tzone = "GB"), roll = FALSE, tz = "GB", week_start = 7)
  
  testthat results ================================================================
  OK: 55 SKIPPED: 0 FAILED: 6
  1. Error: can create Person object with other info fields (@test_person.R#6) 
  2. Error: can load in additional data as dataframe (@test_person.R#22) 
  3. Error: can load in list of dataframe grouping assignments (@test_person.R#33) 
  4. Error: no error when creating Person object with no start and end date (@test_person.R#47) 
  5. Error: no error when creating empty Person object (@test_person.R#54) 
  6. Error: plot_i_hr_datetime produces a ggplot object (@test_viz_plot.R#73) 
  
  Error: testthat unit tests failed
  Execution halted