From 5df569e1fd3aa7f942965022b0bbab603c2e02da Mon Sep 17 00:00:00 2001 From: hsonne Date: Sat, 12 Aug 2023 11:14:32 +0200 Subject: [PATCH] Improve readability --- R/analyse.R | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/R/analyse.R b/R/analyse.R index d15ac8d..570a3e6 100644 --- a/R/analyse.R +++ b/R/analyse.R @@ -23,9 +23,12 @@ analyse <- function(x, path = "") if (is.recursive(x)) { - result[["children"]] <- lapply(seq_along(x), function(i) { - analyse(x[[i]], path = paste(path, i, sep = "/")) - }) + result[["children"]] <- lapply( + X = seq_along(x), + FUN = function(i) { + analyse(x[[i]], path = paste0(path, "/", i)) + } + ) } result