On Fri, Aug 4, 2017 at 4:25 PM, Bert Gunter <bgunter.4...@gmail.com> wrote: >> f <- function(foo,bar) structure(list(bar),names =foo) > >> f("hello","world") > $hello > [1] "world" > > Cheers, > Bert
Thanks Bert, I didn't know about "structure()". Giovanni ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.