guessTaskType: Guess the type of high-level task of a code block

Description Usage Arguments Value Author(s) See Also Examples

Description

This attempts to infer the type of the task being performed. There is a small set of known task types, listed in system.file("Vocabulary", package = "CodeDepends").

Currently this uses simple rules. In the future, we might use a classifier.

Usage

1
guessTaskType(e, info = getInputs(e))

Arguments

e

the code block to be analyzed. This can be a call or an expression. Typically it is an element of a Script-class, i.e. a ScriptNode-class object

info

meta-information about the

Value

A character vector giving the different task identifiers.

Author(s)

Duncan Temple Lang

See Also

readScript

Examples

1
2
3
4
5
6
7
8
  guessTaskType(quote(plot(x, y)))

  e = expression({
          d = read.table("myData.txt")
          d$abc = d$a + log(d$b)
          d[ d$foo == 1, ] = sample(n)
      })
  guessTaskType(e)

CodeDepends documentation built on May 2, 2019, 4:19 a.m.