diff --git a/R/measurement_utils.R b/R/measurement_utils.R index 6d5ac76..485e424 100644 --- a/R/measurement_utils.R +++ b/R/measurement_utils.R @@ -1,7 +1,7 @@ #' @export -plot.osem_measurements = function (x, ...) { +plot.osem_measurements = function (x, ..., mar = c(2,4,1,1)) { oldpar = par() - par(mar = c(2,4,1,1)) + par(mar = mar) plot(value~createdAt, x, col = factor(x$sensorId), xlab = NA, ylab = x$unit[1], ...) par(mar = oldpar$mar) invisible(x) @@ -10,6 +10,7 @@ plot.osem_measurements = function (x, ...) { #' @export print.osem_measurements = function (x, ...) { print.data.frame(x, ...) + invisible(x) } #' Converts a foreign object to an osem_measurements data.frame.