Skip to content

'$lim' in 'pscales' allows for partial matching #41

@MichaelChirico

Description

@MichaelChirico

Follow-up to #40

lattice/R/splom.R

Lines 171 to 172 in 757d099

if (is.list(pscales) && !is.null(pscales[[i]]$lim))
pscales[[i]]$lim

Prior to #40, there was some ambiguity in what is expected here -- the code says $lim but $limits was tested.

Mostly this seems like a documentation/consistency issue -- what values are allowed (design decision), and how is this documented.

If partial matching is allowed intentionally, this should be encoded explicitly, e.g. with [[pmatch("lim", names(pscales[[i]]))]] instead of $lim. Or perhaps just [["lim"]] to prevent partial matching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions