[chronojump] encoder analyze table row dates are now date of exercise, not session date



commit f51cc6805927600faf5313521d8182b246f88aa9
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 28 00:53:57 2018 +0200

    encoder analyze table row dates are now date of exercise, not session date

 encoder/graph.R | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 77f0f196..48ff95ef 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -3824,7 +3824,17 @@ doProcess <- function(options)
                         #print("---- 3 ----")
                         #print(pafCurves)
                         
-                        write.csv(pafCurves, op$OutputData1, quote=FALSE)
+                        #write.csv(pafCurves, op$OutputData1, quote=FALSE)
+                       #we create pafCurvesWrite and mantain pafCurves because pafCurves is used on 
Pmax(F0,V0)
+                       pafCurvesWrite = pafCurves
+                        if(! singleFile)
+                       {
+                               if( length(pafCurvesWrite[,1]) > length(curves[,7]) )
+                                       pafCurvesWrite[,1] = c( curves[,7], rep(NA, 
length(pafCurvesWrite[,1]) - length(curves[,7])) )
+                               else
+                                       pafCurvesWrite[,1] = curves[,7]
+                       }
+                       write.csv(pafCurvesWrite, op$OutputData1, quote=FALSE)
                         #print("curves written")
                 }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]