tdhock / PeakSegFPOP-paper

Functional pruning optimal partioning algorithm for PeakSeg constrained segmentation model
1 stars 0 forks source link

lack of interactive variables for animint2dir function #3

Open nhintruong opened 1 month ago

nhintruong commented 1 month ago

I encountered an error while running the animint2dir function in source code https://github.com/tdhock/PeakSegFPOP-paper/blob/aa762a058cf592055b03b6ffaaeac62e0ce78cf5/figure-constrained-PDPA-normal-real.R. The error message states 'data does not have interactive variables'.

> animint2dir(viz, ""figure-constrained-PDPA-normal-real"")
mapping: x = mean, y = cost, key = 1, showSelected = total.segments, showSelected2 = timestep 
geom_line: na.rm = FALSE
stat_identity: na.rm = FALSE
position_identity 
$problem.aes
  <NA> 
""NULL"" 

$data.variables
 [1] ""total.segments"" ""timestep""       ""piece.i""        ""quadratic""     
 [5] ""linear""         ""constant""       ""min.mean""       ""max.mean""      
 [9] ""data.i""         ""mean""           ""cost""           ""data.i.fac""    
[13] ""minimization""   ""seg.i""         

Error in animint2dir(viz, ""figure-constrained-PDPA-normal-real"") : 
  data does not have interactive variables
In addition: Warning message:
In diff(as.integer(single.df$data.var)) : NAs introduced by coercion

@tdhock Could you please have a look and help me point out the method to resolve this issue or what might be causing it? Thank you

tdhock commented 1 month ago

https://github.com/tdhock/PeakSegFPOP-paper/blob/aa762a058cf592055b03b6ffaaeac62e0ce78cf5/figure-constrained-PDPA-normal-real.R#L1376 is probably the geom_point in question. can you please push a PR with your modifications of the code?

Also why are there ""double quotes"" in your output where there should be "single quotes" ?