Skip to content

Commit

Permalink
use seq_len / seq_along
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstaab committed Jan 28, 2017
1 parent ea08e6b commit ede0afe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/model.R
Expand Up @@ -149,7 +149,7 @@ has_trios <- function(model) {


get_snp_positions <- function(seg_sites, model, relative=TRUE) {
lapply(1:length(seg_sites), function(locus) {
lapply(seq_along(seg_sites), function(locus) {
pos <- get_positions(seg_sites[[locus]])
locus_length <- get_locus_length(model, locus, total = FALSE)

Expand Down
2 changes: 1 addition & 1 deletion R/model_getters.R
Expand Up @@ -58,7 +58,7 @@ get_parameter <- function(model) {
get_locus_length <- function(model, locus = NULL, group = NULL, total = TRUE) {
llm <- get_locus_length_matrix(model)
if (is.null(locus) & is.null(group)) {
group <- 1:nrow(llm)
group <- seq_len(nrow(llm))
}

# Group and locus are identical for ilv models
Expand Down

0 comments on commit ede0afe

Please sign in to comment.