Learn R Programming

dMod (version 0.1)

as.obj: Generate dummy list of class obj from named numeric

Description

Generate dummy list of class obj from named numeric

Usage

as.obj(p)

Arguments

p
Names numeric vector

Value

  • list with entries value (0), gradient (rep(0, length(p))) and hessian (matrix(0, length(p), length(p))) of class obj.

Examples

Run this code
p <- c(A = 1, B = 2)
as.obj(p)

Run the code above in your browser using DataLab