From 5ed31c939b51264b5e1c935dbf12959e9ef14bf4 Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:01:16 -0400 Subject: [PATCH] Use `lapply()` instead of `sapply()` --- R/assess_dependencies.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/assess_dependencies.R b/R/assess_dependencies.R index e8ddd3ae..cbd07c3c 100644 --- a/R/assess_dependencies.R +++ b/R/assess_dependencies.R @@ -104,7 +104,7 @@ get_package_dependencies <- function(name, repo){ ap <- available.packages(repos = repo) deps <- ap[rownames(ap)==name, c("LinkingTo","Imports","Depends")] deps <- deps[!is.na(deps)] - deps <- sapply(strsplit(deps, ","), trimws) + deps <- lapply(strsplit(deps, ","), trimws) deps <- data.frame(package=unlist(deps), type=rep(names(deps), sapply(deps, length)), stringsAsFactors = FALSE,