mjemons / spatialFDA

a package to compute spatial metrics and comparing them using functional data analysis
1 stars 0 forks source link

Fix error when to few points for inhomogeneous functions #9

Closed sgunz closed 3 months ago

sgunz commented 3 months ago

Problem occurs when there are too few points to fit inhomogeneous density. So far this was handled in calcMetric.R line 42: sum(table(pp_sub$marks) > 2) > 1) but this removes some curves in the diabetes example.

Solution: tryCatch to handle exception.