Skip to content

add rownames to data in fromList.R#272

Open
enriquemondragon wants to merge 1 commit intohms-dbmi:masterfrom
enriquemondragon:master
Open

add rownames to data in fromList.R#272
enriquemondragon wants to merge 1 commit intohms-dbmi:masterfrom
enriquemondragon:master

Conversation

@enriquemondragon
Copy link
Copy Markdown

@enriquemondragon enriquemondragon commented Mar 9, 2026

A common request seems to be to work with the sets generated by the package. Adding rownames to data in the fromList.R script is a simple change that can facilitate this task, as users can know which elements are present in each set for downstream analysis.

Small example:

listInput <- list(one = c(1, 2, 3, 5, 7, 8, 11, 12, 13), 
                  two = c(1, 2, 4, 5, 10), 
                  three = c(1, 5, 6, 7, 8, 9, 10, 12, 13))

df <- fromList(listInput) 
# E.g., elements present in sets one and three, but not in two
rownames(df[df$one == 1 & df$two == 0 & df$three == 1,])
# [1] "7"  "8"  "12" "13"

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant