Package: formula.tools 1.7.1

Christopher Brown

formula.tools: Programmatic Utilities for Manipulating Formulas, Expressions, Calls, Assignments and Other R Objects

These utilities facilitate the programmatic manipulations of formulas, expressions, calls, assignments and other R language objects. These objects all share the same structure: a left-hand side, operator and right-hand side. This packages provides methods for accessing and modifying this structures as well as extracting and replacing names and symbols from these objects.

Authors:Christopher Brown [aut, cre], Decision Patterns [cph]

formula.tools_1.7.1.tar.gz
formula.tools_1.7.1.zip(r-4.5)formula.tools_1.7.1.zip(r-4.4)formula.tools_1.7.1.zip(r-4.3)
formula.tools_1.7.1.tgz(r-4.4-any)formula.tools_1.7.1.tgz(r-4.3-any)
formula.tools_1.7.1.tar.gz(r-4.5-noble)formula.tools_1.7.1.tar.gz(r-4.4-noble)
formula.tools_1.7.1.tgz(r-4.4-emscripten)formula.tools_1.7.1.tgz(r-4.3-emscripten)
formula.tools.pdf |formula.tools.html
formula.tools/json (API)
NEWS

# Install 'formula.tools' in R:
install.packages('formula.tools', repos = c('https://decisionpatterns.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/decisionpatterns/formula.tools/issues

On CRAN:

16 exports 17 stars 5.84 score 1 dependencies 75 dependents 230 scripts 12.8k downloads

Last updated 7 years agofrom:45b6654e4d. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 11 2024
R-4.5-winOKSep 11 2024
R-4.5-linuxOKSep 11 2024
R-4.4-winOKSep 11 2024
R-4.4-macOKSep 11 2024
R-4.3-winOKSep 11 2024
R-4.3-macOKSep 11 2024

Exports:envget.varsinvertis.one.sidedis.two.sidedlhslhs.varslhs<-opop.typeop<-rhsrhs.varsrhs<-split_termstoggle.sign

Dependencies:operator.tools

Readme and manuals

Help Manual

Help pageTopics
Invert multiple elements of a multiple element object.invert.plural .invert.single
Converts a formula to characteras.character as.character.formula
Get the environmentenv env.formula
Manipulate the component parts of formulas, expressions, calls, name/symbols and list and vectors of such objects..replace.lhs.plural .replace.op.plural .replace.rhs.plural .replace.rhs.singular .replace.ths.plural .rhs.singular formula.parts lhs lhs,<--method lhs,call-method lhs,expression-method lhs,formula-method lhs,list-method lhs<- lhs<-,<--method lhs<-,call-method lhs<-,expression-method lhs<-,formula-method lhs<-,list-method op op,<--method op,call-method op,expression-method op,formula-method op,list-method op,name-method op<- op<-,<--method op<-,call-method op<-,expression-method op<-,formula-method op<-,list-method rhs rhs,<--method rhs,call-method rhs,expression-method rhs,formula-method rhs,list-method rhs<- rhs<-,<--method rhs<-,call-method rhs<-,expression-method rhs<-,formula-method rhs<-,list-method `lhs<-`,<--method
Get variable (names) from various R objects.lhs.vars .rhs.vars get.vars get.vars,ANY,ANY-method get.vars,ANY,ANY-methods get.vars,call,ANY-method get.vars,expression,missing-method get.vars,formula,ANY-method get.vars,name,ANY-method get.vars,NULL,ANY-method get.vars,NULL,ANY-methods lhs.vars lhs.vars,call-method lhs.vars,expression-method lhs.vars,formula-method rhs.vars rhs.vars,call-method rhs.vars,expression-method rhs.vars,formula-method
invertinvert invert,call-method invert,expression-method
Determine if an object is one- or two-sided. Test whether a object (typically formula, call or expression) is one- (e.g. '~x') or two-sided (e.g. 'x~y').is.one.sided is.one.sided,<--method is.one.sided,ANY-method is.one.sided,call-method is.one.sided,expression-method is.one.sided,formula-method is.one.sided,list-method is.two.sided is.two.sided,<--method is.two.sided,ANY-method is.two.sided,call-method is.two.sided,expression-method is.two.sided,formula-method is.two.sided,list-method
Get the operator type used in an call, formula, expression, etc.op.type op.type,<--method op.type,ANY-method op.type,call-method op.type,expression-method op.type,formula-method op.type,list-method op.type-methods
Split object into termssplit_terms
termsterms terms.call terms.expression
toggle the sign of an expressiontoggle.sign