# NOT RUN {
lm_spec <- linear_reg(penalty = 0.01)
# `penalty` is tranlsated to `lambda`
translate(lm_spec, engine = "glmnet")
# `penalty` not applicable for this model.
translate(lm_spec, engine = "lm")
# `penalty` is tranlsated to `reg_param`
translate(lm_spec, engine = "spark")
# with a placeholder for an unknown argument value:
translate(linear_reg(penalty = varying(), mixture = varying()), engine = "glmnet")
# }
Run the code above in your browser using DataLab