Skip to content
Prev 371498 / 398506 Next

update numeric values of list with new values...

Well,  that's a bit like driving from Boston to New York by way of Chicago.

See ?structure

test <- list(a=1,b=2,c=3)
new <- c(4,5,6)
test.new <- structure(as.list(new), names=names(test))
test.new
$a
[1] 4

$b
[1] 5

$c
[1] 6

Cheers,
Bert




Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Sep 22, 2017 at 7:51 AM, Evan Cooch <evan.cooch at gmail.com> wrote: