Skip to main content
added 489 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
Normal @ First @ Ratios[TimeSeries /@ {data2, data1}] 
{ {{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}

Or define a function:

ClearAll[rF]
rF = Normal @* First @* Ratios @* Map[TimeSeries] @* Reverse;

rF @ {data1, data2}

enter image description here

Normal@ rF @ {data1, data2}

{{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}

Or use the property "Path":

rF[{data1, data2}]["Path"]
 {{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}
Normal @ Ratios[TimeSeries /@ {data2, data1}] 
{{{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}}
Normal @ First @ Ratios[TimeSeries /@ {data2, data1}] 
 {{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}

Or define a function:

ClearAll[rF]
rF = Normal @* First @* Ratios @* Map[TimeSeries] @* Reverse;

rF @ {data1, data2}

enter image description here

Normal@ rF @ {data1, data2}

{{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}

Or use the property "Path":

rF[{data1, data2}]["Path"]
 {{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

Normal @ Ratios[TimeSeries /@ {data2, data1}] 
{{{1, 17/728}, {2, 54/1367}, {3, 33/1040}, {4, 77/1998}, {5, 4/45}}}