sumWithNA.Rd 616 B

12345678910111213141516171819202122232425262728293031
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/modifyData.R
  3. \name{sumWithNA}
  4. \alias{sumWithNA}
  5. \title{Sum columns in data frame df where some of the entries might be NA}
  6. \usage{
  7. sumWithNA(
  8. df,
  9. var1 = "lesionmtv41",
  10. var2 = "metastasesmtv41",
  11. outVar = "totalmtv41",
  12. valIfNA = 0
  13. )
  14. }
  15. \arguments{
  16. \item{df}{data frame}
  17. \item{var1}{first column}
  18. \item{var2}{second column}
  19. \item{outVar}{which variable to store sum into}
  20. \item{valIfNA}{which value to use for NA}
  21. }
  22. \value{
  23. updated data frame
  24. }
  25. \description{
  26. Sum columns in data frame df where some of the entries might be NA
  27. }