Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(synapser)
- library(purrr)
- #' Convenience function to get table as a data frame
- #' Will not be needed with a new synapser release
- tableQueryAsDf <- function(query) {
- synTableQuery(query)$asDataFrame()
- }
- #' get a data frame of rallies from a root project
- get_rallies <- function(root_project) {
- rallies <- tableQueryAsDf(sprintf('select * from %s', root_project$annotations[["rallyTableId"]][0]))
- }
- #' get a data frame of sprints from a rally project
- get_sprints <- function(rally_project) {
- rallies <- tableQueryAsDf(sprintf('select * from %s', rally_project$annotations[['sprintTableId']][0]))
- }
- syn <- synLogin(silent=TRUE)
- root_project_id <- 'syn11645282'
- root_project <- synapser::synGet(root_project_id)
- rallies <- get_rallies(root_project)
- sprints <- purrr::map_dfr(rallies$id, function(x) get_sprints(synGet(x)))
- sprint_wikis <- purrr::map(sprints$id, synGetWiki)
Add Comment
Please, Sign In to add comment