VEuPathDB / EdaNewIssues

0 stars 0 forks source link

EDA visualisation edge case 500 error with histogram #713

Closed bobular closed 1 month ago

bobular commented 8 months ago

The error is from R (see below) but I'm not sure which repo to send this to.

Where: qa.clinepidb.org and the live site Study: BetterBirth Cluster Randomized Trial Filters: Birth rate: 16.2 to 17.55 Viz: histogram, x-var = District code

There is only one value for District code (it's a low-ish cardinality integer I think) and so you can't really make a histogram.

The Rserve logs have this:

2023-10-24 20:53:45 Calculated sample sizes per group.

2023-10-24 20:53:45 Base plot.data object created.

2023-10-24 20:53:45 Supporting summary statistics calculated for histogram.

2023-10-24 20:53:45 Determined default viewport.

2023-10-24 20:53:45 Determined bin width slider min, max and step values.
Error in veupathUtils::cut_width(xVP, binWidth, boundary = min(xVP)) : 
  Less than two breaks in utils-cut.R
In addition: Warning messages:
1: no function found corresponding to methods exports from ‘veupathUtils’ for: ‘asJSON’ 
2: replacing previous import ‘data.table::as.data.table’ by ‘veupathUtils::as.data.table’ when loading ‘plot.data’ 
3: replacing previous import ‘veupathUtils::toJSON’ by ‘jsonlite::toJSON’ when loading ‘plot.data’ 
4: replacing previous import ‘data.table::as.data.table’ by ‘veupathUtils::as.data.table’ when loading ‘microbiomeComputations’ 
5: In veupathUtils::nonZeroRound(binSliderMax, avgDigits) :
  Input is already zero and cannot be rounded to a non-zero number.
6: In veupathUtils::nonZeroRound(binSliderMin, avgDigits) :
  Input is already zero and cannot be rounded to a non-zero number.
7: In veupathUtils::nonZeroRound(((binSliderMax - binSliderMin)/1000),  :
  Input is already zero and cannot be rounded to a non-zero number.
aurreco-uga commented 1 month ago

seems we figured a way cause it shows fine now the histogram