Last active
October 13, 2015 17:27
-
-
Save dtenenba/5c07100f4ad9ada0b722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for the release announcement, a list of new package names and their Description fields | |
# start with 'pkgs' which is a vector of new package names | |
# manually generate this by diffing the last 2 manifests | |
f <- function(pkg) { | |
desc <- sprintf("%s/DESCRIPTION", pkg) | |
dcf <- read.dcf(desc) | |
desc <- dcf[,'Description'] | |
names(desc) <- pkg | |
desc | |
} | |
descs <- unlist(lapply(sort(pkgs), f)) | |
x <- "" | |
for(name in names(descs)) { | |
x <<- paste0(x, "\n\n", name, " - ", gsub("\n", " ", unname(descs[name]))) | |
} | |
cat(x, file="some.file.txt") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment