From 1e4c96c78637b1d119b79f2bdfd09bf56d109e75 Mon Sep 17 00:00:00 2001 From: Stefan Widgren Date: Wed, 20 Dec 2017 17:07:46 +0100 Subject: [PATCH] Change 'lengths(x)' to 'sapply(x, length)' to work with R ver 3.1 Signed-off-by: Stefan Widgren --- R/status.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/status.r b/R/status.r index f0dafd2f9..50b98cc7c 100644 --- a/R/status.r +++ b/R/status.r @@ -1,5 +1,5 @@ ## git2r, R bindings to the libgit2 library. -## Copyright (C) 2013-2016 The git2r contributors +## Copyright (C) 2013-2017 The git2r contributors ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License, version 2, @@ -134,7 +134,7 @@ print.git_status <- function(x, ...) invisible(NULL) } - if (max(lengths(x)) == 0L) + if (max(sapply(x, length)) == 0L) cat("working directory clean\n") if (length(x$ignored)) {