Last active
December 20, 2020 06:04
-
-
Save program--/c826ea52673f92d5bfc819f668bd7845 to your computer and use it in GitHub Desktop.
R function for getting an organized tibble from Microsoft Planner data (exported Excel spreadsheet).
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
#' Also see: https://github.com/program--/plannr | |
#' importsFrom readxl read_excel | |
#' importsFrom tibble as_tibble | |
import_plan <- function(xlsx) { | |
plan_data <- readxl::read_excel(xlsx) | |
plan_name <- colnames(plan_data[[2]][2]) | |
plan_date <- plan_data[[2]][2] | |
filtered_data <- setNames(plan_data, plan_data[4, ]) | |
filtered_data <- filtered_data[-c(1,2,3,4), ] | |
# You can filter Buckets/Tasks out by using dplyr::filter() | |
# | |
# filtered_data <- filtered_data %>% | |
# dplyr::filter( | |
# `Bucket Name` != "Bucket 1", | |
# `Task Name` != "Task 1" | |
# ) | |
tibble::as_tibble(filtered_data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment