sch_get_activity: Get Activity

Description Usage Arguments Value See Also Examples

View source: R/sch_activity.R

Description

Gets an activity by id.

Usage

1
sch_get_activity(sch, aid)

Arguments

sch

A schedule object.

aid

An activity id as defined by the user.

Value

A an activity information in a tibble with one line, or an error if activity id doesn't exist.

See Also

sch_activities(), sch_duration(), sch_nr_activities(), sch_add_activities(), sch_critical_activities(), sch_has_any_activity(), sch_change_activities_duration(), sch_add_activity().

Examples

1
2
3
4
5
6
7
8
sch <- sch_new() %>%
  sch_add_activities(
    id        = 1:17,
    name      = paste("a", as.character(1:17), sep=""),
    duration  = c(1L,2L,2L,4L,3L,3L,3L,2L,1L,1L,2L,1L,1L,1L,1L,2L,1L)
  ) %>%
  sch_plan()
sch_get_activity(sch, 7)

rubens2005/criticalpath documentation built on Feb. 6, 2022, 10:54 p.m.