Maybe something like that?
// Create a new GTS with ten values
NEWGTS
'test name' RENAME
{ 'label0' '42' 'label1' 'foo' } RELABEL
100 NaN NaN NaN 10 ADDVALUE
400 NaN NaN NaN 10 ADDVALUE
500 NaN NaN NaN 6 ADDVALUE
700 NaN NaN NaN 6 ADDVALUE
800 NaN NaN NaN 6 ADDVALUE
900 NaN NaN NaN 6 ADDVALUE
1000 NaN NaN NaN 4 ADDVALUE
1100 NaN NaN NaN 4 ADDVALUE
200 NaN NaN NaN 10 ADDVALUE
300 NaN NaN NaN 10 ADDVALUE
'split-label'
VALUESPLIT <%
'gts' STORE
$gts LABELS 'split-label' GET TOLONG 'v' STORE
[ $gts $v mapper.replace 0 0 0 ] MAP 0 GET
%> F LMAP
Le jeudi 24 février 2022 à 13:13:15 UTC+1, [email protected] a écrit :
> Hi,
>
> I have a case where I should split a time series by its value as a
> consequences.
>
> Example:
> Input: a GTS with these values
> 100 0
> 200 0
> 300 0
> 400 1
> 500 1
> 600 0
> 700 1
> 800 1
> 900 1
> 1000 0
> 1100 0
>
> Output: [100,200,300],[400,500],[600],[700,800,900],[1000,1100]
> or any correspondent output.
>
> How can I achieve that without iterating the GTS values manually?
>
--
You received this message because you are subscribed to the Google Groups "Warp
10 users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/warp10-users/dd214cf9-d5cc-404d-9353-a424755af860n%40googlegroups.com.