Skip to content

parallel::splitList never existed? #12

@MichaelChirico

Description

@MichaelChirico

parSpl <- try(parallel::splitList, silent=TRUE)
## Use the "splitList" function from parallel if it's exported
## Otherwise, use the definition it had in R 3.0.2.
"splitList" <- if (inherits(parSpl, "try-error")) {
function (x, ncl)
lapply(splitIndices(length(x), ncl), function(i) x[i])
} else {
parSpl
}

This fails tools:::.check_packages_used()$imp2un. The comment appears misguided -- I find no evidence this function has ever existed. In particular here's the {parallel} NAMESPACE for R 3.0.2:

https://github.com/wch/r-source/blob/tags/R-3-0-2/src/library/parallel/NAMESPACE

Checked the full SVN history with a script from Gemini:

https://gist.github.com/MichaelChirico/2f5e578c3464ea584bd4a006563ecd94

So I think we can simplify this code by just assuming the test will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions