mathesong / kinfitr

kinfitr: PET Kinetic Modelling Using R
Other
33 stars 7 forks source link

metab_gamma sometimes returning NaN warnings #28

Closed mathesong closed 3 months ago

mathesong commented 8 months ago
library(kinfitr)
library(tidyverse)

data(pbr28)

pbr28 <- pbr28 %>% 
  mutate(pfdat = map(blooddata, bd_extract, output="parentFraction"))

pbr28 <- pbr28 %>% 
  group_by(PET) %>% 
  mutate(gammafit = map(pfdat, ~metab_gamma(.x$time, .x$parentFraction)))

giving warnings about NaN values. The fits are all fine, but it's from multstart. Should just suppress the warnings on the fit itself.

mathesong commented 3 months ago

Added a suppressWarnings wrapper for the function in a64722276afd7d05c84e0988349342ca766ccb7e