Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions R/summarizePedigree.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ summarizePedigrees <- function(ped,
)
}
if (!is.null(founder_sort_var) &&
!founder_sort_var %in% names(ped)) {
!founder_sort_var %in% names(ped)) {
stop(
"If you set founder_sort_var, that variable must be a column in the pedigree data. If you want to sort by using the default, set founder_sort_var = NULL. The default is to sort by birth year if that's present and by personID otherwise."
)
Expand Down Expand Up @@ -265,7 +265,7 @@ summarizePedigrees <- function(ped,
)
}
}
return(output)
output
}


Expand Down Expand Up @@ -316,7 +316,7 @@ calculateSummaryDT <- function(data,
]
# Flatten the nested lists
summary_stats <- data.table::as.data.table(summary_stats[, lapply(.SD, unlist), by = group_var])
return(summary_stats)
summary_stats
}

#' Function to find the originating member for each line
Expand Down Expand Up @@ -363,7 +363,7 @@ summarizeFounder <- function(ped_dt,
by = group_var,
suffixes = c("", "_founder")
)
return(foo_summary_dt)
foo_summary_dt
}


Expand Down Expand Up @@ -392,7 +392,7 @@ findFooest <- function(foo_summary_dt,
}
))

return(subset_foo)
subset_foo
}

#' Function to find the oldest individuals in a pedigree
Expand All @@ -414,7 +414,7 @@ findOldest <- function(foo_summary_dt,
n_fooest = n_fooest,
decreasing = FALSE
)
return(oldest_foo)
oldest_foo
}

#' Function to find the biggest families in a pedigree
Expand All @@ -436,7 +436,7 @@ findBiggest <- function(foo_summary_dt,
n_fooest = n_fooest,
decreasing = TRUE
)
return(biggest_foo)
biggest_foo
}

#' Function to prepare the pedigree for summarization
Expand Down Expand Up @@ -492,7 +492,7 @@ prepSummarizePedigrees <- function(ped,
}


return(ped)
ped
}

#' Function to summarize the oldest individuals in a pedigree
Expand Down Expand Up @@ -548,5 +548,5 @@ summarizeOldest <- function(byr = NULL,
)
}
}
return(output)
output
}
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ options(citation.bibtex.max = 0)
[![Package downloads](https://cranlogs.r-pkg.org/badges/grand-total/BGmisc)](https://cran.r-project.org/package=BGmisc)</br>
[![R-CMD-check](https://github.com/R-Computing-Lab/BGmisc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/R-Computing-Lab/BGmisc/actions/workflows/R-CMD-check.yaml)
[![Dev Main branch](https://github.com/R-Computing-Lab/BGmisc/actions/workflows/R-CMD-dev_maincheck.yaml/badge.svg)](https://github.com/R-Computing-Lab/BGmisc/actions/workflows/R-CMD-dev_maincheck.yaml)
[![CodeFactor](https://www.codefactor.io/repository/github/r-computing-lab/bgmisc/badge)](https://www.codefactor.io/repository/github/r-computing-lab/bgmisc)
[![Codecov test coverage](https://codecov.io/gh/R-Computing-Lab/BGmisc/graph/badge.svg?token=2IARK2XSA6)](https://app.codecov.io/gh/R-Computing-Lab/BGmisc)
![License](https://img.shields.io/badge/License-GPL_v3-blue.svg)
<!-- badges: end -->
Expand Down
Loading