Learn R Programming

projmanr (version 0.2.1)

gantt: Creates a Gantt chart of tasks in a project.

Description

Creates a Gantt chart of tasks in a project.

Usage

gantt(df, start_date = Sys.Date(), color_critical = "#f4424b",
  color_non_critical = "#41a9f4", bar_size = 8, text_size = 3)

Arguments

df

Task input. This can either be a data frame of raw data (i.e not from the 'critical_path' function) or can the return value from calling the 'critical path' function. If the data is raw, if must have columns "ID, name, duration, dependencies" in that order. These columns need not be named but they must be in that order. Type 'taskdata1' into the console for an example of raw data.

start_date

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

color_critical

Default: #f4424b (red). The color of the bars for tasks in the critical path.

color_non_critical

Default: #41a9f4 (light blue). The color of the bars for tasks not in the critical path.

bar_size

Default: 8. The size of the bars in the Gantt chart.

text_size

Default: 3. The size of the text in the Gantt chart. The color of the bars for tasks not in the critical path.

Value

A gantt chart for the tasks. If data has been processed by the critical path function, then this gantt chart will color the critical path elements.

Examples

Run this code
# NOT RUN {
# Use raw example data
data <- taskdata1
# Create a gantt chart using the raw data
gantt(data)

res <- critical_path(data)

# Create a second gantt chart using the processed data
gantt(res)

# }

Run the code above in your browser using DataLab