Skip to content

Commit

Permalink
Use lapply() instead of sapply()
Browse files Browse the repository at this point in the history
  • Loading branch information
jthompson-arcus committed Jul 9, 2024
1 parent b469cb7 commit 5ed31c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/assess_dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ed31c9

Please sign in to comment.