subset_list_of_lists: Subset a list of lists to a list of desired lists only Subset...

View source: R/subset_list_of_lists.R

subset_list_of_listsR Documentation

Subset a list of lists to a list of desired lists only Subset a list of lists down to a list of lists containing only lists with the value at a certain position (with this values indicated in another list)

Description

Subset a list of lists to a list of desired lists only Subset a list of lists down to a list of lists containing only lists with the value at a certain position (with this values indicated in another list)

Usage

subset_list_of_lists(list_of_lists, desired_list, subindex = 1)

Arguments

list_of_lists

a list of lists, such as a list of lists containing SNP window position, SNPs and scaffold, as generated by pre_allocate

desired_list

list of desired elements

subindex

index of lists within list of lists, which will be checked to see if the list contains the desired element and should be subsetted

Value

A list in which all of the values indicated by the 'subindex' parameter are matched by the 'desired_list'

Examples

subset_list_of_lists(list_of_lists = small_pre_allocated_windows,
                     desired_list = c(14515000, 14491000),
                     subindex = 1)


naglemi/mtmcskat documentation built on Aug. 23, 2023, 5:35 p.m.