Considering the python code:

for k, v in d.items(): do_something(k); do_something_else(v)

I have the following for R:

for (i in c(1:length(d))) { do_something(names(d[i]));
do_something_else(d[[i]]) }

This does not seem seems idiomatic. What is the best way of doing the
same with R?

Thanks.

Luis

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to