Revision 3eb05b47e3c64708a402ce1abb3216dc2ace91e8 authored by Berend Hasselman on 07 August 2022, 13:10:02 UTC, committed by cran-robot on 07 August 2022, 13:10:02 UTC
1 parent 2d43468
xnames.R
library(nleqslv)
f <- function(x) {
y <-numeric(length(x))
y[1] <- x[1]^2 + x[2]^3
y[2] <- x[1] + 2*x[2] + 3
y
}
# test named x-values
xstart <- c(a=1.0, b=0.5)
xstart
z <- nleqslv(xstart,f, control=list(trace=0))
all(names(z$x) == names(xstart))
# test named x-values
xstart <- c(u=1.0, 0.5)
xstart
z <- nleqslv(xstart,f, control=list(trace=0))
all(names(z$x) == names(xstart))
Computing file changes ...