View source: R/snp_utils_plot.R
find_containing_bin | R Documentation |
A short description...
find_containing_bin(start, end, num, num_bins = 50, return_full_df = F)
start |
|
end |
|
num |
|
num_bins |
|
return_full_df |
If the number (num
) is not between the start and end (num > start & num <= end
), the function returns NA
.
A number or a dataframe
# Example 1
find_containing_bin(start = 5515473, end = 5515517, pos = 5515489, return_full_df = F)
# Example 2: bin changes when pos increase
a <- 10 ; b <- 95
sapply(c(1:30), function(x) { find_containing_bin(start = a, end = b, pos = a+x) })
# Example 3: returning NA when num not in the range
find_containing_bin(start = 50, end = 150, num = 40, return_full_df = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.