Learn R Programming

projmanr (version 0.2.1)

critical_path: Generate the critical path for a collection of related tasks

Description

Generate the critical path for a collection of related tasks

Usage

critical_path(df, gantt = F, network = F, start_date = Sys.Date())

Arguments

df

A data frame of tasks with columns ID, name, duration, id's of predecessrs (as a comma separated string) in that order. Name of columns does not matter, only order. Type 'taskdata1' into the console for an example of valid data.

gantt

Boolean that specifies whether or not to produce a gantt chart of the results.

network

Boolean that specifies whether or not to produce a network diagram of the results

start_date

Starting date for the project. Defaults to the current date.

Value

A list of results.

  • critical_path The id's of the critical path.

  • results A data frame representation of the results that can be passed to the 'gantt' function.

  • gantt Gantt chart if 'gantt' argument is true.

  • duration The duration of the project in days.

  • end_date The end date of the project.

  • network Network diagram if 'network' argument true.

Examples

Run this code
# NOT RUN {
# Use provided sample data
df <- taskdata1

res <- critical_path(df)

# }

Run the code above in your browser using DataLab