Hi, in R-devel (4.2.0), we now get:
> mapply(paste, "A", character(), USE.NAMES = TRUE) named list() Now, in ?mapply we have: USE.NAMES: logical; use the names of the first ... argument, or if that is an unnamed character vector, use that vector as the names. This basically says we should get: > answer <- list() > first <- "A" > names(answer) <- first which obviously is an error. The help is not explicit what should happen when the length "of the first ... argument" is zero, but the above behavior effectively does something like: > answer <- list() > first <- "A" > names(answer) <- first[seq_along(answer)] > answer named list() Is there a need for the docs to be updated, or should the result be an unnamed empty list? /Henrik ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel