I have used the diff(x,) function on a data set to find the difference between force for time intervals of 0.0003s. The problem is due to this high sampling frequencies and the measuring inaccuracies of the system this does not yield any meaningful data.
I am wondering if it was possible to find the difference between 100 consecutive numbers. For example "difference = (Fz101+Fz102...Fz200)-(Fz1+Fz2...Fz100)
currently i am dividing by 0.000333 (sampling frequency) since i am trying to find the peak value for (delta Fz)/(delta t.)
(max(diff(lift_S8_Intns40_chainno$Fz)))/0.00033333
[1] 40472.2
Seen a similiar question asked if this helps anyone in helping me. [link to similiar question][1] How to find the difference between sums of consecutive pairs and triplets in R?
Any help is appreciated but my skills are not good in r so please make it as simple as possible.
Data structure
structure(list(Time = c(18.31266667, 18.313, 18.31333333, 18.31366667,
18.314, 18.31433333, 18.31466667, 18.315, 18.31533333, 18.31566667,
18.316, 18.31633333, 18.31666667, 18.317, 18.31733333, 18.31766667,
18.318, 18.31833333, 18.31866667, 18.319, 18.31933333, 18.31966667,
18.32, 18.32033333, 18.32066667, 18.321, 18.32133333, 18.32166667,
18.322, 18.32233333, 18.32266667, 18.323, 18.32333333, 18.32366667,
18.324, 18.32433333, 18.32466667, 18.325, 18.32533333, 18.32566667,
18.326, 18.32633333, 18.32666667, 18.327, 18.32733333, 18.32766667,
18.328, 18.32833333, 18.32866667, 18.329, 18.32933333, 18.32966667,
18.33, 18.33033333, 18.33066667, 18.331, 18.33133333, 18.33166667,
18.332, 18.33233333, 18.33266667, 18.333, 18.33333333, 18.33366667,
18.334, 18.33433333, 18.33466667, 18.335, 18.33533333, 18.33566667,
18.336, 18.33633333, 18.33666667, 18.337, 18.33733333, 18.33766667,
18.338, 18.33833333, 18.33866667, 18.339, 18.33933333, 18.33966667,
18.34, 18.34033333, 18.34066667, 18.341, 18.34133333, 18.34166667,
18.342, 18.34233333, 18.34266667, 18.343, 18.34333333, 18.34366667,
18.344, 18.34433333, 18.34466667, 18.345, 18.34533333, 18.34566667,
18.346, 18.34633333, 18.34666667, 18.347, 18.34733333, 18.34766667,
18.348, 18.34833333, 18.34866667, 18.349, 18.34933333, 18.34966667,
18.35, 18.35033333, 18.35066667, 18.351, 18.35133333, 18.35166667,
18.352, 18.35233333, 18.35266667, 18.353, 18.35333333, 18.35366667,
18.354, 18.35433333, 18.35466667, 18.355, 18.35533333, 18.35566667,
18.356, 18.35633333, 18.35666667, 18.357, 18.35733333, 18.35766667,
18.358, 18.35833333, 18.35866667, 18.359, 18.35933333, 18.35966667,
18.36, 18.36033333, 18.36066667, 18.361, 18.36133333, 18.36166667,
18.362, 18.36233333, 18.36266667, 18.363, 18.36333333, 18.36366667,
18.364, 18.36433333, 18.36466667, 18.365, 18.36533333, 18.36566667,
18.366, 18.36633333, 18.36666667, 18.367, 18.36733333, 18.36766667,
18.368, 18.36833333, 18.36866667, 18.369, 18.36933333, 18.36966667,
18.37, 18.37033333, 18.37066667, 18.371, 18.37133333, 18.37166667,
18.372, 18.37233333, 18.37266667, 18.373, 18.37333333, 18.37366667,
18.374, 18.37433333, 18.37466667, 18.375, 18.37533333, 18.37566667,
18.376, 18.37633333, 18.37666667, 18.377, 18.37733333, 18.37766667,
18.378, 18.37833333, 18.37866667, 18.379), Fz = c(2751.996392,
2751.614101, 2752.364284, 2751.993635, 2751.615723, 2751.995127,
2751.989063, 2751.241442, 2749.366648, 2750.486962, 2748.242022,
2747.498762, 2748.245589, 2747.4998, 2748.254604, 2748.631317,
2749.006798, 2750.129349, 2749.38176, 2749.385262, 2748.640657,
2750.13658, 2748.640073, 2749.393888, 2750.145076, 2751.274421,
2750.157172, 2750.15688, 2750.165279, 2752.407479, 2752.042472,
2753.550297, 2752.424309, 2750.927558, 2751.688556, 2751.317583,
2752.819117, 2752.45398, 2752.836757, 2752.472626, 2754.353062,
2754.725527, 2755.111158, 2754.376021, 2752.882448, 2752.510924,
2754.006329, 2755.508722, 2756.638796, 2756.636202, 2757.76947,
2756.284199, 2757.408096, 2758.165381, 2757.418894, 2758.172774,
2758.178838, 2758.936415, 2758.56421, 2757.448825, 2757.824079,
2758.569203, 2759.69824, 2760.082914, 2759.711827, 2760.840004,
2761.215128, 2760.84743, 2760.099193, 2760.851808, 2759.359468,
2758.25031, 2758.624201, 2759.755281, 2760.511577, 2761.635327,
2763.137948, 2763.143331, 2761.64191, 2763.1528, 2762.406524,
2763.525491, 2763.157339, 2762.781356, 2763.909695, 2764.666851,
2763.919813, 2763.543975, 2763.928017, 2765.045866, 2765.426243,
2766.182961, 2765.058383, 2763.936351, 2765.06542, 2763.947052,
2764.699019, 2764.70424, 2763.584867, 2763.22145, 2763.975492,
2764.349189, 2764.354994, 2763.613307, 2760.9942, 2759.878475,
2762.486297, 2762.115389, 2763.994527, 2762.121615, 2762.876597,
2761.391148, 2761.391991, 2761.768055, 2761.769126, 2759.525662,
2758.406516, 2758.786634, 2758.783261, 2757.669758, 2756.920758,
2756.540737, 2756.545277, 2756.176055, 2756.171515, 2755.423667,
2754.67611, 2753.178257, 2752.423923, 2753.16895, 2748.678277,
2747.927494, 2746.429754, 2746.424955, 2746.797971, 2746.424663,
2745.674982, 2746.424792, 2743.432215, 2743.432994, 2741.179315,
2742.67553, 2739.672447, 2738.921647, 2738.173637, 2737.424005,
2736.294822, 2735.180735, 2734.431882, 2734.425007, 2733.301013,
2732.930623, 2730.676264, 2729.172881, 2728.424855, 2727.298218,
2726.930066, 2726.177678, 2724.680797, 2723.5587, 2723.931652,
2722.428675, 2721.683421, 2720.557108, 2718.311893, 2716.438883,
2717.549484, 2717.545139, 2718.671354, 2714.548217, 2716.42254,
2713.060416, 2714.557005, 2714.554119, 2712.681174, 2711.561898,
2710.437904, 2710.438585, 2709.688272, 2707.067122, 2708.192203,
2705.564778, 2707.439879, 2705.949079, 2705.573079, 2705.577036,
2704.828393, 2702.954102, 2702.20199, 2701.079406, 2699.206235,
2697.708138, 2695.836101, 2696.588814, 2696.968721, 2696.966354,
2696.970764, 2696.22504, 2694.349549, 2695.852121)), .Names = c("Time",
"Fz"), row.names = 1299:1498, class = "data.frame")