wrangle_raw_plan.Rd
This function is usually called first, for instance after a raw project plan was imported from an speadsheet, see import_xlsx.
wrangle_raw_plan(df, date_origin = "1899-12-30")
df | Essential columns that must be provided are
|
---|---|
date_origin | Reference date in format YYYY-mm-dd for converting an integer to a date. For dates (post-1901) from Windows Excel origin should by 1899-12-30 (is the default value). For dates (post-1901) from Mac Excel origin should by 1904-01-01. |
data.table
with columns preprocessed for calculating time lines with calculate_time_lines.
copy from df where NA's are replaced by 'UNKNOWN'
copy from df where NA's are replaced by 'UNKNOWN'
copy from df where NA's are replaced by NOT_SPECIFIED_<number> and a prefix for the project
copy from df but adjusted for the project-prefix and PREVIOUS-tag
copy from df but adjusted for the project-prefix and PREVIOUS-tag
concatenation of depends_on and start
copy from df where NA's are replaced by 'UNKNOWN'
copy from df where NA's are replaced by 'UNKNOWN'
copy from df where NA's are replaced by 0
'copy' from df as date-object
'copy' of start from df as date-object
'copy' of end from df as date-object
copy of est_duration
TRUE/FALSE according to the status-column from df
number of tasks that were combined to one because of the same id
raw_plan <- import_xlsx(system.file("template","projects.xlsx", package = "projectPlan")) wrangle_raw_plan(raw_plan)#> project id depends_on #> 1: kitchen kitchen::NOT_SPECIFIED_1 NA #> 2: kitchen kitchen::roughplan kitchen::NOT_SPECIFIED_1 #> 3: kitchen kitchen::NOT_SPECIFIED_3 NA #> 4: kitchen kitchen::NOT_SPECIFIED_4 kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: kitchen kitchen::plan kitchen::NOT_SPECIFIED_4 #> 6: kitchen kitchen::buy kitchen::plan #> 7: kitchen kitchen::NOT_SPECIFIED_7 kitchen::plan #> 8: kitchen kitchen::NOT_SPECIFIED_8 kitchen::buy,kitchen::NOT_SPECIFIED_7 #> start prior_ids #> 1: NA NA #> 2: NA kitchen::NOT_SPECIFIED_1 #> 3: kitchen::roughplan kitchen::roughplan #> 4: NA kitchen::NOT_SPECIFIED_3,kitchen::roughplan #> 5: NA kitchen::NOT_SPECIFIED_4 #> 6: NA kitchen::plan #> 7: NA kitchen::plan #> 8: NA kitchen::buy,kitchen::NOT_SPECIFIED_7 #> section resource #> 1: kitchen::0_prep I #> 2: kitchen::0_prep I #> 3: kitchen::0_prep F1, F2, I #> 4: kitchen::1_offer Company, I #> 5: kitchen::1_offer Company, I #> 6: kitchen::1_offer I #> 7: kitchen::2_installation I #> 8: kitchen::2_installation Company, I #> task progress deadline #> 1: measure kitchen 0 <NA> #> 2: make a rough plan 0 <NA> #> 3: ask friends which companies they can recommend 0 <NA> #> 4: make appointment with company for planning 0 <NA> #> 5: plan new kitchen 0 <NA> #> 6: buy new kitchen 0 <NA> #> 7: make appointment for installation 0 <NA> #> 8: installation of the new kitchen 0 2020-02-07 #> fixed_start_date fixed_end_date est_days waiting aborted unscheduled #> 1: 2019-12-28 <NA> 1 FALSE FALSE TRUE #> 2: <NA> <NA> 2 FALSE FALSE TRUE #> 3: <NA> <NA> 2 FALSE FALSE TRUE #> 4: <NA> <NA> 5 FALSE FALSE TRUE #> 5: <NA> <NA> 1 FALSE FALSE TRUE #> 6: <NA> <NA> 1 FALSE FALSE TRUE #> 7: <NA> <NA> 1 FALSE FALSE TRUE #> 8: <NA> <NA> 1 FALSE FALSE TRUE #> nmb_combined_entries #> 1: 1 #> 2: 1 #> 3: 1 #> 4: 1 #> 5: 1 #> 6: 1 #> 7: 1 #> 8: 1