Search Results:

Showing results 1 to 10 of 2,427.


Function isNumeric [limma v3.28.14]
keywords
programming
title
Test for Numeric Argument
description
Test whether argument is numeric or a data.frame with numeric columns.
Function writeExpectTest [BurStMisc v1.1]
keywords
programming
title
Text for a testthat test
description
Automatically writes the text of a testthat::expect_equal test of an expression.
Function runUpToSection [CodeDepends v0.6.5]
keywords
programming
title
Evaluate the code blocks up to a particular section of a document
description
This function allows the caller to evaluate the code blocks within a document all the way up to a specified section of the document.
Function splitRedefinitions [CodeDepends v0.6.5]
keywords
programming
title
Divide a script into separate lists of code based on redefinition of a variable
description
The purpose of this function is to take a script consisting of individual calls or code blocks and to divide it into separate blocks in which a particular variable has only one definition. Within each block the variable is assigned a new value. At present, the code is quite simple and separates code blocks that merely alter an existing variable's characteristics, e.g. setting the names, an individual variable. Ideally we want to separate very different uses of a symbol/variable name which are unrelated. We will add more sophisticated code to (heuristically) detect such different uses, e.g. explicit assignments to a variable. Separating these code blocks can make it easier to treat the definitions separately and the different stages of the script.
Function guessTaskType [CodeDepends v0.6.5]
keywords
programming
title
Guess the type of high-level task of a code block
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.
Function highlightCode [CodeDepends v0.6.5]
keywords
programming
title
Display R code with highlighting of variables, links to functions and packages
description
This function leverages the highlight package to create an HTML display of R code. It connects all instances of a variable in the code so that a viewer can move the mouse over a variable and see all uses of it in the code. The motivations for this is to help navigate a script and to allow us to connect the code to plots of, for example, the time-line or life-span of variables in a script.
Function updatingScript [CodeDepends v0.6.5]
keywords
programming
title
Create a Script object that re-reads the original file as needed
description
This function reads the code in a particular document and creates a Script-class object to represent the code and allow us to do analysis on that code. Unlike readScript, this object continues to read any updates to the original code file when we use this Script object in computations. This allows us to modify the original source interactively and concurrently with our R session and still have the script remain up-to-date with that code.
Function findWhenUnneeded [CodeDepends v0.6.5]
keywords
programming
title
Determine the code block after which a variable can be explicitly removed
description
These functions analyze the meta-information about code blocks and determine when a variable is no longer needed and can add code to the relevant code block to remove the variable.
Function getPropagateChanges [CodeDepends v0.6.5]
keywords
programming
title
Determine which expressions to update when a variable changes
description
This function allows us to determine which subsequent expressions in the document need to be evaluated when a variable is assigned a new value. This is the "opposite" of determining on which variables a given variable depends; this is for identifying which variables and expressions need to be updated when a variable changes. This is of use when propogating changes to dependent expressions.
Function getInputs [CodeDepends v0.6.5]
keywords
programming
title
Get input and output variables and literals from R expressions
description
This function is used to analyze an R expression and identify the input and output variables in the expressions and related packages that are loaded and files that are referenced. This might be better called getCodeDepends. It is not to be confused with getVariableInputs.