Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

apollo_insertScaling

Scales variables inside a function


Description

It changes the syntax of the function by replacing variable names for their scaled form, e.g. x –> x*apollo_inputs$apollo_scale[["x"]]. In assignments, it only scales the right side of the assignment.

Usage

apollo_insertScaling(e, sca)

Arguments

e

Function, expression, call or symbol to alter.

sca

Named numeric vector with the scales. The names in these vectors determine which variables should be scaled.

Value

A function, expression, call or symbol with the corresponding variables scaled.


apollo

Tools for Choice Model Estimation and Application

v0.2.4
GPL-2
Authors
Stephane Hess [aut], David Palma [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.