8000 gstudio/R/partition.R · Issue #15 · dyerlab/gstudio · GitHub
[go: up one dir, main page]

Skip to content

gstudio/R/partition.R #15

Open
Open

Description

@NorEasterMT

for line 29 of gstudio/R/partition.R, I believe the line should be changed from:

ret[[lvl]] <- droplevels( x[ x[[stratum]]==lvl, ] )

to:

ret[[lvl]] <- droplevels( x[ which(x[[stratum]]==lvl), ] )

in order to avoid empty rows of NA within each population corresponding to every line of the input data frame that doesn't match the stratum.

Activity

  1. NorEasterMT commented on Apr 8, 2021

    @NorEasterMT
    Author

    Also, if the stratum is formatted as a number rather than a character or a factor, the following error will be thrown:
    Error in rep(" ", max(nchar(names(pops)))) : invalid 'times' argument
    In addition: Warning message:
    In max(nchar(names(pops))) :
    no non-missing arguments to max; returning -Inf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0