get_target {fakemake}R Documentation

Get a Makelist's Target

Description

Get a single target from a makelist by alias.

Usage

get_target(makelist, alias)

Arguments

makelist

A list for make.

alias

The alias of the target in question.

Value

A list (the target requested).

See Also

Other functions to manipulate makelists: add_target(), remove_target()

Examples

ml <- provide_make_list()
visualize(ml, root = "all.Rout")
i <- which(sapply(ml, "[[", "target") == "b1.Rout")
ml[[i]]["alias"] <- "b1"
t <- get_target(ml, "b1")
ml <- remove_target(ml, t[["target"]])
visualize(ml)
ml <- add_target(ml, target = t[["target"]], code = t[["code"]],
                sink = t[["sink"]],
                prerequisite_to = "a1.Rout", alias = NULL)
all.equal(ml, provide_make_list())

[Package fakemake version 1.11.1 Index]