rStats.js v1.3.0
    Preparing search index...

    Function split

    • The values of x (or the rows of a data frame) divided into groups. Equivalent to R's split(x, f, drop, sep).

      f is one array of group labels or an array of such arrays, one per factor. The result is a Map from the group's name to its values, in R's order: with one factor its levels; with several every combination of their levels (the first factor varying fastest), named by joining the levels with sep, the empty ones included unless drop. Values whose label is missing are left out.

      Parameters

      Returns Map<string, DataFrame>

      split([1, 2, 3], ["b", "a", "b"]); // Map { "a" => [2], "b" => [1, 3] }
      
    • The values of x (or the rows of a data frame) divided into groups. Equivalent to R's split(x, f, drop, sep).

      f is one array of group labels or an array of such arrays, one per factor. The result is a Map from the group's name to its values, in R's order: with one factor its levels; with several every combination of their levels (the first factor varying fastest), named by joining the levels with sep, the empty ones included unless drop. Values whose label is missing are left out.

      Parameters

      Returns Map<string, number[]>

      split([1, 2, 3], ["b", "a", "b"]); // Map { "a" => [2], "b" => [1, 3] }
      
    • The values of x (or the rows of a data frame) divided into groups. Equivalent to R's split(x, f, drop, sep).

      f is one array of group labels or an array of such arrays, one per factor. The result is a Map from the group's name to its values, in R's order: with one factor its levels; with several every combination of their levels (the first factor varying fastest), named by joining the levels with sep, the empty ones included unless drop. Values whose label is missing are left out.

      Type Parameters

      • T

      Parameters

      Returns Map<string, T[]>

      split([1, 2, 3], ["b", "a", "b"]); // Map { "a" => [2], "b" => [1, 3] }