79508711

Date: 2025-03-14 10:10:01
Score: 1
Natty:
Report link

You can also want to use a function with two arguments: name and item. In this case mapply() is your friend:
score <- list(name1 = 1, name2 = 2)
res <- mapply(names(score), score, FUN=function(nm, it) it*nchar(nm))

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Serguei Sokol