Difference between revisions of "Z^3 Array Manipulation Member Functions"
(80 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
==ARRAY FUNCTIONS== | ==ARRAY FUNCTIONS== | ||
A listing of the Array functions are given below: | A listing of the Array functions are given below: | ||
+ | |||
+ | Every Array Member Function is also globalized with the same name but with Uppercase First Letter. For example, .chunks has a twin Global called Chunks, which take first parameter as an array, and followed with the exact same parameters of the original member function. Hence Chunks(Array,ChunkSize) will work the same. If there is an existing function with a similar name, then the globalized name will have a $x appended to it. For example, .map is also available as Map$x. | ||
+ | |||
+ | Quick Reference: | ||
+ | Array.R = Array.reduce | ||
+ | Array.M = Array.map | ||
+ | Array.F = Array.filter | ||
+ | |||
Function name Parameter | Function name Parameter | ||
Line 11: | Line 19: | ||
! Function Name !! scope="col" style="width: 30px;" | Parameters !! Notes | ! Function Name !! scope="col" style="width: 30px;" | Parameters !! Notes | ||
|- | |- | ||
− | | [[Array.$()|$]] || || Apply functions to each element of array | + | | [[Array.$()|$]] || Function/Array of Functions || Apply functions to each element of array |
|- | |- | ||
− | | [[Array.$$()|$$]] || || Apply functions to each row of array | + | | [[Array.$$()|$$]] ||Function/Array of Functions || Apply functions to each row of array |
|- | |- | ||
− | | [[Array.$$$()|$$$]] || || Apply functions to each column of array | + | | [[Array.$$$()|$$$]] || Function/Array of Functions || Apply functions to each column of array |
|- | |- | ||
| [[Array.$$F()|$$F]] || Function/Array of Functions|| Append results of functions to each row | | [[Array.$$F()|$$F]] || Function/Array of Functions|| Append results of functions to each row | ||
Line 21: | Line 29: | ||
| [[Array.$A()|$A ]] || Parameter || Get attributes from an array of objects | | [[Array.$A()|$A ]] || Parameter || Get attributes from an array of objects | ||
|- | |- | ||
− | | [[Array. | + | | [[Array.rcfunctions|$C ]] || Column Array to apply, Function/Array of Functions, Optional Parameters|| Apply a function with parameters to a column |
|- | |- | ||
− | | [[Array. | + | | [[Array.rcfunctions|$CELLS ]] ||Row/Column Area indices and width and height to apply (l,t,w,h), Function/Array of Functions, Optional Parameters|| Apply a function with parameters to a cell area |
|- | |- | ||
− | | [[Array.$d()|$d ]] || || | + | | [[Array.$d()|$d ]] || || Same as Array.$diag |
|- | |- | ||
− | | [[Array.$diag()|$diag ]] || || | + | | [[Array.$diag()|$diag ]] || || Apply function to the proper diagonal of an array |
|- | |- | ||
− | | [[Array.$dth()|$dth ]] || || | + | | [[Array.$dth()|$dth ]] || || Apply function to dth diagonal of an array |
|- | |- | ||
− | | [[Array. | + | | [[Array.diagonal()|diagonal ]] || || Get the nth diagonal of an array |
|- | |- | ||
− | | [[Array. | + | | [[Array.rcfunctions|$R ]] ||Row Array to apply, Function/Array of Functions, Optional Parameters|| Apply a function with parameters to a row |
|- | |- | ||
− | | [[Array.$ | + | | [[Array.$X()|$X ]] || SomeArray || Combines two arrays using an across operation. Reverse is .X$ |
|- | |- | ||
− | | [[Array.$_()|$_]] || | + | | [[Array.$x()|$x ]] ||SomeArray || Same as $X |
+ | |- | ||
+ | | [[Array.$_()|$_]] || Mode, Functions, Parameters || Apply a function to the entire array as one aggregate call | ||
|- | |- | ||
| [[Array.__$()|__$ ]] || Mode, Functions, Parameters|| Using a mode (value, valuebyrow, index etc), apply a function to the cells with parameters | | [[Array.__$()|__$ ]] || Mode, Functions, Parameters|| Using a mode (value, valuebyrow, index etc), apply a function to the cells with parameters | ||
Line 53: | Line 63: | ||
| [[Array.addcolumn()|addcolumn ]] || NumberOfColumns || Add specified number of columns to the array | | [[Array.addcolumn()|addcolumn ]] || NumberOfColumns || Add specified number of columns to the array | ||
|- | |- | ||
− | | [[Array_Row_Column_Modify_Functions|addrow ]] || NumberOfRows || | + | | [[Array_Row_Column_Modify_Functions|addrow ]] || NumberOfRows || Add specified number of rows to the array |
|- | |- | ||
− | | [[Array.addsequence()|addsequence ]] || InFront, StartFrom, OptionalSequenceArray || | + | | [[Array.addsequence()|addsequence ]] || InFront, StartFrom, OptionalSequenceArray || Add the sequence value to the specified column |
|- | |- | ||
| [[Array.adjoint()|adjoint ]] || Array || Adjoint of the matrix | | [[Array.adjoint()|adjoint ]] || Array || Adjoint of the matrix | ||
+ | |- | ||
+ | | [[Array.after()|after]] ||(NthOrExpOrFn, BothSides,IsCaseSpecific) || Give elements after a certain index. If Exp or Fn given for first parameter, finds a matching element, and find elements after that. Exclude the element at the index itself. | ||
+ | |- | ||
+ | | [[Array.afterx()|afterx]] ||(NthOrExpOrFn, BothSides,IsCaseSpecific) || Same as .after, but includes the element at the index. | ||
|- | |- | ||
| [[Array.aggregate()|aggregate ]] || Columns,Function, Params || Apply functions to columns with parameters given | | [[Array.aggregate()|aggregate ]] || Columns,Function, Params || Apply functions to columns with parameters given | ||
+ | |- | ||
+ | |- | ||
+ | | [[Array.allslices() | allslices ]] || SliceSize || slices of numbers | ||
|- | |- | ||
| [[Array.any()|any ]] || Count || Get Count elements from the array randomly | | [[Array.any()|any ]] || Count || Get Count elements from the array randomly | ||
|- | |- | ||
− | | [[Array.appendfunction()|appendfunction ]] || Function || | + | | [[Array.appendfunction()|appendfunction ]] || Function || Adds a column which the result of this function on the remaining row. |
+ | |- | ||
+ | | [[Array_Row_Column_Modify_Functions|ar ]] || || Modify the array row/Column | ||
+ | |- | ||
+ | | [[Array.around()|around]] ||(NthOrExpOrFn, Count, BothSides,IsCaseSpecific) || Give elements before and after a certain index, upto Count. If Exp or Fn given for first parameter, finds a matching element, and find elements around that. Exclude the element at the index itself. | ||
|- | |- | ||
− | | [[ | + | | [[Array.aroundx()|aroundx]] ||(NthOrExpOrFn, BothSides,IsCaseSpecific) || Same as .around, but includes the element at the index. |
|- | |- | ||
| [[Array.async()|async ]] || Iterator, CallBack || | | [[Array.async()|async ]] || Iterator, CallBack || | ||
|- | |- | ||
− | | [[Array.atindex()|atindex ]] || || | + | | [[Array.atindex()|atindex ]] ||List of indices || Indices indicated by the parameters |
|- | |- | ||
| [[Array.atnode()|atnode ]] || Function, SubtractByArray, ScaleByArray, DoNotShowIndices || | | [[Array.atnode()|atnode ]] || Function, SubtractByArray, ScaleByArray, DoNotShowIndices || | ||
|- | |- | ||
− | | [[Array.backward()|backward ]] || Function, StartValue || | + | | [[Array.backward()|backward ]] || Function, StartValue || Backwards the given array from the start value |
+ | |- | ||
+ | | [[Array.before()|before]] ||(NthOrExpOrFn, BothSides,IsCaseSpecific) || Give elements before a certain index. If Exp or Fn given for first parameter, finds a matching element, and find elements after that. Exclude the element at the index itself. | ||
+ | |- | ||
+ | | [[Array.before()|beforex]] ||(NthOrExpOrFn, BothSides,IsCaseSpecific) || Same as .before, but includes the element at the index. | ||
|- | |- | ||
| [[Array.bindcolumn()|bindcolumn ]] || || | | [[Array.bindcolumn()|bindcolumn ]] || || | ||
|- | |- | ||
− | | [[Array.branch()|branch ]] || | + | | [[Array.branch()|branch ]] || fns (default [neg, zero, positive]) || Give an array of functions (default one for negative, zero and positive with false/true for each value in the array). Any arbitrary array of functions will generate a similar array as output. -10..10.branch([LT,[EQ,GT]]) .print() |
|- | |- | ||
| [[Array.branchvalues()|branchvalues ]] || SomeOnlyMatches || Give three arrays (one for negative, zero and positive) with value that matched for each value in the array. SomeOnlyMatches if true, shows only for the items that matched the condition | | [[Array.branchvalues()|branchvalues ]] || SomeOnlyMatches || Give three arrays (one for negative, zero and positive) with value that matched for each value in the array. SomeOnlyMatches if true, shows only for the items that matched the condition | ||
|- | |- | ||
− | | [[ | + | | [[Array.buckets() | buckets]] || || An object with key frequency pairs. |
+ | |- | ||
+ | | [[Array.bykey() | bykey]] || || Create an object from the array with array elements bucketed by keys from a column | ||
|- | |- | ||
| [[Array.c()|c ]] || Columns || Extract columns from array | | [[Array.c()|c ]] || Columns || Extract columns from array | ||
Line 87: | Line 114: | ||
| [[Array.calci()|calci ]] || || Convert array to calci | | [[Array.calci()|calci ]] || || Convert array to calci | ||
|- | |- | ||
− | | [[Array. | + | | [[Array.head()|head ]] || || Head of an array |
|- | |- | ||
| [[Array.cartesianproduct()|cartesianproduct ]] || IsWithoutFlatten || Create a cartesian product of the elements of the arrays. | | [[Array.cartesianproduct()|cartesianproduct ]] || IsWithoutFlatten || Create a cartesian product of the elements of the arrays. | ||
Line 95: | Line 122: | ||
| [[Array.cell()|cell ]] || Row, Column, Width, Height || Cells with the specified addresses | | [[Array.cell()|cell ]] || Row, Column, Width, Height || Cells with the specified addresses | ||
|- | |- | ||
− | | [[Array.cell()|cells ]] || || Cells with the specified addresses. Same as [[Array.cell()|cell ]] | + | | [[Array.cell()|cells ]] || Row, Column, Width, Height || Cells with the specified addresses. Same as [[Array.cell()|cell ]] |
|- | |- | ||
| [[Array.checktype()|checktype ]] || TypeArray, ForceCheckOnVariables || Check if elements are of the type/typearray mentioned | | [[Array.checktype()|checktype ]] || TypeArray, ForceCheckOnVariables || Check if elements are of the type/typearray mentioned | ||
|- | |- | ||
− | | [[Array.chunks()|chunks ]] || ChunkSize || Chunks of size from array. [[Array.pieces()|pieces ]] gives pieces of size starting with each element which is different | + | | [[Array.chunks()|chunks ]] || ChunkSize, Function || Chunks of size from array. Function is applied to the chunks if provided. [[Array.pieces()|pieces ]] gives pieces of size starting with each element which is different. |
|- | |- | ||
| [[Array.ci()|ci ]] || || Apply a function to column indices (same as Array.__$ in "ic" mode) | | [[Array.ci()|ci ]] || || Apply a function to column indices (same as Array.__$ in "ic" mode) | ||
Line 107: | Line 134: | ||
| [[Array.clear()|clear ]] || FillWith || Clear array and fill with FillWith if provided | | [[Array.clear()|clear ]] || FillWith || Clear array and fill with FillWith if provided | ||
|- | |- | ||
− | | [[Array.clearcopy()|clearcopy ]] || FillWith || | + | | [[Array.clearcopy()|clearcopy ]] || FillWith || Clear each element in a copy of the array |
|- | |- | ||
| [[Array.clearrepeats()|clearrepeats ]] || || | | [[Array.clearrepeats()|clearrepeats ]] || || | ||
Line 113: | Line 140: | ||
| [[Array.clone()|clone ]] || || Clone an array | | [[Array.clone()|clone ]] || || Clone an array | ||
|- | |- | ||
− | | [[Array_Concat_Functions|colconcat ]] || || Concat columns | + | | [[Array_Concat_Functions|colconcat ]] || AnotherArray || Concat columns |
|- | |- | ||
| [[Array.colcount()|colcount ]] || || Column Count | | [[Array.colcount()|colcount ]] || || Column Count | ||
Line 133: | Line 160: | ||
| [[Array.compare()|compare ]] || || | | [[Array.compare()|compare ]] || || | ||
|- | |- | ||
− | | [[Array.concatall()|concatall ]] || LimitArray, IncludeEdges || | + | | [[Array.concatall()|concatall ]] || LimitArray, IncludeEdges ||Concatenates all the elements in an array or table row wise. |
|- | |- | ||
| [[Array.converge()|converge ]] || Function, NumberOfIterations, Accuracy, Converge || | | [[Array.converge()|converge ]] || Function, NumberOfIterations, Accuracy, Converge || | ||
|- | |- | ||
− | | [[Array.copy()|copy ]] || || | + | | [[Array.copy()|copy ]] || || Make a copy of the array |
|- | |- | ||
| [[Array.core()|core ]] || || | | [[Array.core()|core ]] || || | ||
Line 143: | Line 170: | ||
| [[Array.count()|count ]] || FirstLevelOnly || | | [[Array.count()|count ]] || FirstLevelOnly || | ||
|- | |- | ||
− | | [[Array.crosstab()|crosstab ]] || RowSet, ColSet,PageSet,DataSet || | + | | [[Array.crosstab()|crosstab ]] || RowSet, ColSet,PageSet,DataSet || Returns a simple cross tabulation of two or more factors |
|- | |- | ||
| [[Array.cube()|cube ]] || || | | [[Array.cube()|cube ]] || || | ||
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumcolumnswith.28SomeFunction.2C_SomeColumns_....29|cumcolumn ]] || || Cumulate column(s) |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumcolumnswith.28SomeFunction.2C_SomeColumns_....29|cumcolumns ]] || || Cumulate column(s) |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumcolumnswith.28SomeFunction.2C_SomeColumns_....29|cumcolumnswith ]] || || Cumulate column(s) with a function |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumcolumnswith.28SomeFunction.2C_SomeColumns_....29|cumcolumnwith ]] || || Cumulate column(s) with a function |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumrow.28Row.7Cempty.29|cumrow ]] || || Cumulate row(s) |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumrow.28Row.7Cempty.29|cumrows ]] || || Cumulate row(s) |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumrow.28Row.7Cempty.29|cumrowswith ]] || || Cumulate row(s) with a function |
|- | |- | ||
− | | [[Array | + | | [[Array_Cumulative_Functions#Array.cumrow.28Row.7Cempty.29|cumrowwith ]] || || Cumulate row(s) with a function |
|- | |- | ||
| [[Array Cumulative Functions|cumulate ]] || || Cumulate elements with NUMSUM | | [[Array Cumulative Functions|cumulate ]] || || Cumulate elements with NUMSUM | ||
Line 167: | Line 194: | ||
| [[Array.data()|data ]] || || | | [[Array.data()|data ]] || || | ||
|- | |- | ||
− | | [[Array.dc()|dc ]] || | + | | [[Array.dc()|dc ]] || Which || Delete columns specified |
|- | |- | ||
− | | [[Array.deal()|deal ]] || Within, ManyInEach || | + | | [[Array.deal()|deal ]] || Within, ManyInEach || Generates Random Numbers |
|- | |- | ||
| [[Array.deepcopy()|deepcopy ]] || || Deep copy of an array | | [[Array.deepcopy()|deepcopy ]] || || Deep copy of an array | ||
|- | |- | ||
− | | [[Array_Row_Column_Modify_Functions|deletecolumn ]] || | + | | [[Array_Row_Column_Modify_Functions|deletecolumn ]] || Which || Delete a specified or last column |
|- | |- | ||
− | | [[Array_Row_Column_Modify_Functions|deleterow ]] || | + | | [[Array_Row_Column_Modify_Functions|deleterow ]] || Which || Delete a specified or last row |
|- | |- | ||
| [[Array.det()|det ]] || Array || Determinant of an array | | [[Array.det()|det ]] || Array || Determinant of an array | ||
|- | |- | ||
− | | [[Array.determinant()|determinant ]] || || Determinant of an array | + | | [[Array.determinant()|determinant ]] || Array || Determinant of an array |
|- | |- | ||
| [[Array.dim()|dim ]] || Dimensions || Create a new array with the dimensions given | | [[Array.dim()|dim ]] || Dimensions || Create a new array with the dimensions given | ||
Line 201: | Line 228: | ||
| [[Array_nth_Functions|eleventh ]] || SomeCount || Pick the SomeCount of items from eleventh position | | [[Array_nth_Functions|eleventh ]] || SomeCount || Pick the SomeCount of items from eleventh position | ||
|- | |- | ||
− | | [[ | + | | [[Array_nth_Functions|ends]] || SomeNth, SomeCount || Pick the SomeCount of items from SomeNth position from both sides of the array |
|- | |- | ||
− | | [[Array.equalvalues()|equalvalues ]] || Array, CheckLength, StartFrom || | + | | [[Array.equal()|equal ]] || Array, CheckLength, StartFrom || Comparing the each value in the array and gives true/false. |
+ | |- | ||
+ | | [[Array.equalvalues()|equalvalues ]] || Array, CheckLength, StartFrom || Comparison of set of arrays with its length and values without considering its order | ||
|- | |- | ||
| [[Array.eval()|eval ]] || || Execute each element of the array as code | | [[Array.eval()|eval ]] || || Execute each element of the array as code | ||
Line 211: | Line 240: | ||
| [[Array.exec()|exec ]] || Parameters || Execute each element of the array as a function with given parameters | | [[Array.exec()|exec ]] || Parameters || Execute each element of the array as a function with given parameters | ||
|- | |- | ||
− | | [[Array.explode()|explode ]] || StartIndex, By, RecurseTillLevel || | + | | [[Array.explode()|explode ]] || StartIndex, By, RecurseTillLevel || Explode each element into a sequence from start Index |
+ | |- | ||
+ | | [[Array.extract()|extract ]] || column list || Extract specified columns | ||
+ | |- | ||
+ | | [[Array.extractslices()|extractslices ]] || SliceExpression, KeepSplitValue, IgnoreRepeats || Splits array with matches, without split value or repeats of match. Useful to get the array split with a match. Similar to .splices | ||
+ | |- | ||
+ | | [[Array.few()|few ]] || IncludeHeader || Pick a few elements from the array randomly | ||
+ | |- | ||
+ | | [[Array.findx()|findx]] || fn,mode,includefalse|| Applies a function and returns matches. Mode can be "INDEX", "ELEMENT", "TRUE"/"TRUTH", "VALUE","INDEXELEMENT","INDEXELEMENTVALUE", etc. includeFalse keeps false matches. | ||
+ | |- | ||
+ | | [[Array.findi()|findi]] || fn,includefalse|| Applies a function and returns indices of matches. | ||
|- | |- | ||
− | | [[Array. | + | | [[Array.finde()|finde]] || fn,includefalse|| Applies a function and returns elements that matched. |
|- | |- | ||
− | | [[Array. | + | | [[Array.findie()|findie]] || fn,includefalse|| Applies a function and returns index and elements that matched. |
+ | |- | ||
+ | | [[Array.findiev()|findiev]] || fn,includefalse|| Applies a function and returns index, elements that matched and result of the match. | ||
+ | |- | ||
+ | | [[Array.findiv()|findiv]] || fn,includefalse|| Applies a function and returns index, result of the match. | ||
+ | |- | ||
+ | | [[Array.findv()|findv]] || fn,includefalse|| Applies a function and returns result of the match. | ||
+ | |- | ||
+ | | [[Array.findt()|findt]] || fn,includefalse|| Applies a function and returns result of the match as true or false. | ||
|- | |- | ||
| [[Array_nth_Functions|fifteenth ]] || SomeCount || Pick the SomeCount of items from fifteenth position | | [[Array_nth_Functions|fifteenth ]] || SomeCount || Pick the SomeCount of items from fifteenth position | ||
Line 229: | Line 276: | ||
| [[Array.filteroncondition()|filteroncondition ]] || TakeDropOrAllFlag, Function, Parameter || Apply a function to an array with parameters, and return list that matched/not matched/all | | [[Array.filteroncondition()|filteroncondition ]] || TakeDropOrAllFlag, Function, Parameter || Apply a function to an array with parameters, and return list that matched/not matched/all | ||
|- | |- | ||
− | | [[Array.filteronrow()|filteronrow ]] || Condition, | + | | [[Array.filteronrow()|filteronrow ]] || Condition, ExtractRows, FilterOnRow || ExtractRows are the rows that are extracted, and filters are applied on FilterOnRow where condition is satisfied |
|- | |- | ||
| [[Array.findcellref()|findcellref ]] || Values || | | [[Array.findcellref()|findcellref ]] || Values || | ||
Line 245: | Line 292: | ||
| [[Array.flatten()|flatten ]] || || Flatten the array to a single dimension | | [[Array.flatten()|flatten ]] || || Flatten the array to a single dimension | ||
|- | |- | ||
− | | [[Array.flip()|flip ]] || || Same as [[Array.transpose()|transpose]] | + | | [[Array.flip()|flip ]] || IncludeHeader || Same as [[Array.transpose()|transpose]] |
|- | |- | ||
| [[Array.flipparts()|flipparts ]] || || Switch first and second half of an array | | [[Array.flipparts()|flipparts ]] || || Switch first and second half of an array | ||
Line 251: | Line 298: | ||
| [[Array.fold()|fold ]] || AtFoldValue, AtReverseFoldValue || | | [[Array.fold()|fold ]] || AtFoldValue, AtReverseFoldValue || | ||
|- | |- | ||
− | | [[Array.foldl()|foldl ]] || Function, StartSeed || | + | | [[Array.foldl()|foldl ]] || Function, StartSeed || Apply a function cumulatively to left |
|- | |- | ||
− | | [[Array.foldr()|foldr ]] || Function, StartSeed || | + | | [[Array.foldr()|foldr ]] || Function, StartSeed || Apply a function cumulatively to right |
|- | |- | ||
| [[Array.forward()|forward ]] || Function, StartValue || | | [[Array.forward()|forward ]] || Function, StartValue || | ||
Line 293: | Line 340: | ||
| [[Array.include()|include ]] || || | | [[Array.include()|include ]] || || | ||
|- | |- | ||
− | | [[Array. | + | | [[Array.indexwith()|indexwith]] || ExpressionOrIndex, IsCaseSpecific || finds the first index that matches the expression. String or Regexp can be provided, or a number. |
|- | |- | ||
− | | [[Array. | + | | [[Array.indexanddata()|indexanddata]] || Function, SubtractByArray, ScaleByArray, DoNotShowIndices, RowArray || Returns the result of applying the Function/FunctionSet to each x,y, and index location of the array, then subtracts and scales the results with SubtractByArray and ScaleByArray. |
|- | |- | ||
− | | [[ | + | | [[Array.indiceswith()|indiceswith]] || ExpressionOrIndex, IsCaseSpecific || finds all indices that matches the expression. String or Regexp can be provided, or a number. |
+ | |- | ||
+ | | [[Array.indices()|indices ]] || Function, SubtractByArray, ScaleByArray, DoNotShowIndices, RowArray || Returns the result of applying the Function/FunctionSet to each x,y location of the array, then subtracts and scales the results with SubtractByArray and ScaleByArray. | ||
+ | |- | ||
+ | | [[Array.injoin()|injoin ]] || JoinWith || A string with all array elements joined starting from second element | ||
+ | |- | ||
+ | | [[Array.inner() |inner ]] || InnerSize || Give inner elements. | ||
|- | |- | ||
| [[Array.insert()|insert ]] || Value, AfterLastFlag || | | [[Array.insert()|insert ]] || Value, AfterLastFlag || | ||
Line 305: | Line 358: | ||
| [[Array_Row_Column_Modify_Functions|insertrow ]] || Index, NumberOfRows || | | [[Array_Row_Column_Modify_Functions|insertrow ]] || Index, NumberOfRows || | ||
|- | |- | ||
− | | [[Array.inverse()|inverse ]] || Array || | + | | [[Array.inverse()|inverse ]] || Array || Calculate the inverse of this array |
|- | |- | ||
| [[Array_Row_Column_Modify_Functions|ir ]] || || | | [[Array_Row_Column_Modify_Functions|ir ]] || || | ||
Line 311: | Line 364: | ||
| [[Array.is()|is ]] || Thing, IsNot || | | [[Array.is()|is ]] || Thing, IsNot || | ||
|- | |- | ||
− | | [[Array.is1d()|is1d ]] || || | + | | [[Array.is1d()|is1d ]] || || Check if there is One dimension |
|- | |- | ||
− | | [[Array.is2d()|is2d ]] || || | + | | [[Array.is2d()|is2d ]] || || Check if there is Two dimension |
|- | |- | ||
− | | [[Array.isFalse()|isFalse ]] || || | + | | [[Array.isFalse()|isFalse ]] || || Check if there is any False |
|- | |- | ||
− | | [[Array.isFalse()|isfalse ]] || | + | | [[Array.isFalse()|isfalse ]] || || Check if there is any False |
|- | |- | ||
| [[Array.islikelytype()|islikelytype ]] || || | | [[Array.islikelytype()|islikelytype ]] || || | ||
Line 325: | Line 378: | ||
| [[Array.isnull()|isnull ]] || || | | [[Array.isnull()|isnull ]] || || | ||
|- | |- | ||
− | | [[Array.isTrue()|isTrue ]] || || | + | | [[Array.isTrue()|isTrue ]] || || Check everything is true |
|- | |- | ||
− | | [[Array.isTrue()|istrue ]] || || | + | | [[Array.isTrue()|istrue ]] || || Check everything is true |
|- | |- | ||
| [[Array.istype()|istype ]] || || | | [[Array.istype()|istype ]] || || | ||
+ | |- | ||
+ | | [[Array.ith()|ith]] || (Nth, Count, BothSides) || Same as .nth, but gives indices starting with 0, while nth gives numbers starting from 1. | ||
|- | |- | ||
| [[Array.j()|j ]] || || | | [[Array.j()|j ]] || || | ||
Line 361: | Line 416: | ||
| [[Array.maplist()|maplist ]] || fun || | | [[Array.maplist()|maplist ]] || fun || | ||
|- | |- | ||
− | | [[Array.mapper()|mapper ]] || Function || | + | | [[Array.mapper()|mapper ]] || Function || Same as $ |
+ | |- | ||
+ | | [[Array.maprow()|maprow ]] || Function || Same as $$ | ||
|- | |- | ||
− | | [[Array. | + | | [[Array.maplength(IncludeStringsEtc)|maplength]] || IncludeStringsEtc || Calculate length of each element. IncludeStringsEtc calculates the length if the element is a string also. |
|- | |- | ||
| [[Array.mask()|mask ]] || || | | [[Array.mask()|mask ]] || || | ||
Line 387: | Line 444: | ||
| [[Array.mid()|mid ]] || From, Count || Pick Count elements from From location onwards | | [[Array.mid()|mid ]] || From, Count || Pick Count elements from From location onwards | ||
|- | |- | ||
− | | [[Array_nth_Functions|millionth ]] || || | + | | [[Array_nth_Functions|millionth ]] || SomeCount || Pick the SomeCount of items from millionth position |
|- | |- | ||
| [[Array.mod|mod]] || Thing || Mod Thing to Array | | [[Array.mod|mod]] || Thing || Mod Thing to Array | ||
Line 399: | Line 456: | ||
| [[Array_nth_Functions|nineth ]] || SomeCount || Pick the SomeCount of items from nineth position | | [[Array_nth_Functions|nineth ]] || SomeCount || Pick the SomeCount of items from nineth position | ||
|- | |- | ||
− | | [[Array.nodeindex()|nodeindex ]] || || | + | | [[Array.nodeindex()|nodeindex ]] || || Simply gives the indices of the node. |
|- | |- | ||
| [[Array.notinclude()|notinclude ]] || Item || | | [[Array.notinclude()|notinclude ]] || Item || | ||
Line 405: | Line 462: | ||
| [[Array.notwithinlimits()|notwithinlimits ]] || LimitArray, IncludeEdges || | | [[Array.notwithinlimits()|notwithinlimits ]] || LimitArray, IncludeEdges || | ||
|- | |- | ||
− | | [[Array_nth_Functions|nth ]] || Nth, Count || Pick the SomeCount of items from nth position | + | | [[Array_nth_Functions|nth ]] || Nth, Count, IsBothSides || Pick the SomeCount of items from nth position. IsBothSides will provide results from both sides of the array. |
|- | |- | ||
| [[Array.ntimes()|ntimes ]] || Function, NumberOfIterations, Accuracy, Converge || | | [[Array.ntimes()|ntimes ]] || Function, NumberOfIterations, Accuracy, Converge || | ||
Line 413: | Line 470: | ||
| [[Array.numbers()|numbers ]] || ForceCheckOnVariables || | | [[Array.numbers()|numbers ]] || ForceCheckOnVariables || | ||
|- | |- | ||
− | | [[Array.objects()|o ]] || || | + | | [[Array.objects()|o ]] || List of Items || Same as [[Array.objects()]] |
|- | |- | ||
− | | [[Array.objects()|objects ]] || | + | | [[Array.objects()|objects ]] || List of Items || Returns the array of Objects in the ZSpace DOM with each element being applied with function OBJECT applied to the variable. |
|- | |- | ||
− | | [[Array.of()|of ]] || || | + | | [[Array.of()|of ]] || elements || Elements used to create the array. |
|- | |- | ||
− | | [[Array. | + | | [[Array.op()|op ]] || || Op with another number using units (Supported Operators %, <, >, <=, >=, ==, !=,===, FEQ Floating Equals) |
|- | |- | ||
− | | [[Array.otherthan()|otherthan ]] || ArrayWithElementsToExclude || | + | | [[Array.otherthan()|otherthan ]] || ArrayWithElementsToExclude || The elements except the specified elements. |
|- | |- | ||
− | | [[ | + | | [[ Array.outer() | outer ]] || OuterSize || Outer 2 elements. |
|- | |- | ||
− | | [[Array.pack()|pack ]] || | + | | [[Array.pack()|pack ]] || || Remove consecutive duplicates and compact the array. |
|- | |- | ||
− | | [[Array.pad()|pad ]] || Length, PadString || | + | | [[Array.pad()|pad ]] || Length, PadString ||Pad the array to be of length NewLength, and fill the extra elements added with PadString . |
|- | |- | ||
| [[Array.pair()|pair ]] || Value, OnRight || | | [[Array.pair()|pair ]] || Value, OnRight || | ||
|- | |- | ||
− | | [[Array.pairmatch()|pairmatch ]] || AtFoldValue, AtReverseFoldValue, StartFrom || | + | | [[Array.pairmatch()|pairmatch ]] || AtFoldValue, AtReverseFoldValue, StartFrom || Folds the array for the corresponding SomeAtFoldValue,into subarrays if the value in the array element matches the given fold value |
|- | |- | ||
| [[Array.partitiononcondition()|partitiononcondition ]] || TakeDropOrAllFlag, Function, Parameter || | | [[Array.partitiononcondition()|partitiononcondition ]] || TakeDropOrAllFlag, Function, Parameter || | ||
|- | |- | ||
− | | [[Array.parts()|parts ]] || NumberOfParts, | + | | [[Array.parts()|parts ]] || NumberOfParts, SpecificPartOrFunction || Divides the array into parts of Part Size. Applies function if provided, or provide the specific requested part such as an element at the index (2nd of 3 parts for example). NumberOfParts can be negative, and it will reverse the array before processing. |
|- | |- | ||
− | | [[Array.pastefolds()|pastefolds ]] || MidOnly || | + | | [[Array.pastefolds()|pastefolds ]] || MidOnly || Unfold the result of a fold. |
|- | |- | ||
− | | [[Array.pick()|pick ]] || | + | | [[Array.pick()|pick ]] || PickMaskArray || Pick all elements that matches a true in the array mask. |
|- | |- | ||
− | | [[Array.pieces()|pieces ]] || Width, Function || | + | | [[Array.pieces()|pieces ]] || Width, Function, Stride || Split the array into pieces of Piece Size. For each piece, a function can be applied. Stride or width can be negative, and will reverse the array before processing. Example: nums = [3,6,9,1]; MAX(nums.pieces(2,MINUS@ABS)) |
|- | |- | ||
− | | [[Array.pip()|pip ]] || | + | | [[Array.pip()|pip ]] || PathIndexArray, Length, PassThroughFunction,UseClone || Push and Insert into subarrays at pathindices given |
|- | |- | ||
− | | [[Array.pipall()|pipall ]] || | + | | [[Array.pipall()|pipall ]] || ExceptIndexUpto, MarkSliced || Push and Insert for all elements from index provided |
|- | |- | ||
− | | [[Array.pipall()|pipallwithslice ]] || || pipall with slices marked for later unpipping | + | | [[Array.pipall()|pipallwithslice ]] || ExceptIndexUpto, MarkSliced || pipall with slices marked for later unpipping |
|- | |- | ||
| [[Array.plot()|plot ]] || || | | [[Array.plot()|plot ]] || || | ||
|- | |- | ||
− | | [[Array.prefix()|prefix ]] || | + | | [[Array.prefix()|prefix ]] || Prefix || Add a prefix to every element in an array |
|- | |- | ||
− | | [[Array.primitives()|primitives ]] || || | + | | [[Array.primitives()|primitives ]] || || Returns the primitive values of objects in the array |
|- | |- | ||
− | | [[Array.print()|print ]] || | + | | [[Array.print()|print ]] || Trimmed, TabLevel || Print an array as a text string |
|- | |- | ||
| [[Array.printf()|printf ]] || || | | [[Array.printf()|printf ]] || || | ||
|- | |- | ||
− | | [[Array.r()|r ]] || || | + | | [[Array.r()|r ]] || Array/Parameters || Same as [[Array.row()]] |
|- | |- | ||
− | | [[Array.random()|rand ]] || || | + | | [[Array.random()|rand ]] ||Base,Count || Same as [[Array.random()]] |
|- | |- | ||
− | | [[Array.random()|random ]] || Base,Numbers || | + | | [[Array.random()|random ]] || Base,Numbers || Fill the array with random numbers |
|- | |- | ||
− | | [[Array. | + | | [[Array.raw()|raw ]] || || Returns pure array without headers, input, input headers, and data indices information. |
|- | |- | ||
− | | [[Array.removeByVal()|removeByVal ]] || Value || | + | | [[Array.remove()|remove ]] || ElementsToRemove|List of Elements || Remove the elements from the original array |
+ | |- | ||
+ | | [[Array.removeByVal()|removeByVal ]] || Value || Removes the value,and changes the original array, unless Return Copy is true. | ||
|- | |- | ||
| [[Array.removeindices()|removeindices ]] || || | | [[Array.removeindices()|removeindices ]] || || | ||
Line 479: | Line 538: | ||
| [[Array.replicate()|replicate ]] || Count || | | [[Array.replicate()|replicate ]] || Count || | ||
|- | |- | ||
− | | [[Array.rest()|rest ]] || Start, Count || | + | | [[Array.rest()|rest ]] || Start, Count || Remove the part of the array from Start |
|- | |- | ||
| [[Array.result()|result ]] || || | | [[Array.result()|result ]] || || | ||
+ | |- | ||
+ | |[[Array.reverse() |reverse]] || Function, StartValue || Reverse the given array from the start value along with the original array. (Dropped) | ||
+ | |- | ||
+ | |[[Array.reversecopy() |reversecopy]] || || Reverse the given array from the start value along with the copy of an original array. | ||
|- | |- | ||
| [[Array.reverselevel()|reverselevel ]] || Level || | | [[Array.reverselevel()|reverselevel ]] || Level || | ||
Line 487: | Line 550: | ||
| [[Array.pipall()|reversepip ]] || SomeExceptIndexUpto, SomeMarkSliced || Push and Insert for all elements from index provided in reverse | | [[Array.pipall()|reversepip ]] || SomeExceptIndexUpto, SomeMarkSliced || Push and Insert for all elements from index provided in reverse | ||
|- | |- | ||
− | | [[Array.reversesort()|reversesort ]] || Function || | + | | [[Array.reversesort()|reversesort ]] || Function || Sorting the arrays in the reverse order. |
|- | |- | ||
| [[Array.ri()|ri ]] || || Apply a function to row indices (same as Array.__$ in "ir" mode) | | [[Array.ri()|ri ]] || || Apply a function to row indices (same as Array.__$ in "ir" mode) | ||
Line 493: | Line 556: | ||
| [[Array.rotate()|rotate ]] || NumberOfSteps || Rotate an array NumberOfSteps times | | [[Array.rotate()|rotate ]] || NumberOfSteps || Rotate an array NumberOfSteps times | ||
|- | |- | ||
− | | [[Array.rotatecolumns()|rotatecolumns ]] || NumberOfSteps || | + | | [[Array.rotatecolumns()|rotatecolumns ]] || NumberOfSteps || Rotates columns in an array with the specified number of steps. |
|- | |- | ||
− | | [[Array.rotaterows()|rotaterows ]] || NumberOfSteps || | + | | [[Array.rotaterows()|rotaterows ]] || NumberOfSteps || Rotates columns in an array with the specified number of steps. |
|- | |- | ||
| [[Array_Row_Column_Functions|row ]] || || | | [[Array_Row_Column_Functions|row ]] || || | ||
Line 509: | Line 572: | ||
| [[Array_Row_Column_Functions|rows ]] || || | | [[Array_Row_Column_Functions|rows ]] || || | ||
|- | |- | ||
− | | [[Array.rslice()|rslice ]] || | + | | [[Array.rslice()|rslice ]] || Begin, End || Same as [[Array.slice()]] |
|- | |- | ||
| [[Array_nth_Functions|second ]] || SomeCount || Pick the SomeCount of items from second position | | [[Array_nth_Functions|second ]] || SomeCount || Pick the SomeCount of items from second position | ||
Line 515: | Line 578: | ||
| [[Array.secondhalf()|secondhalf ]] || || Get second half of the array | | [[Array.secondhalf()|secondhalf ]] || || Get second half of the array | ||
|- | |- | ||
− | | [[Array.seq()|seq ]] || StartIndex, By || | + | | [[Array.seq()|seq ]] || StartIndex, By || Replaces each element in this array by a number sequence from StartIndex incremented by By |
|- | |- | ||
| [[Array.set()|set ]] || || | | [[Array.set()|set ]] || || | ||
Line 523: | Line 586: | ||
| [[Array.setcolumn()|setcolumn ]] || Column, ColumnValues || | | [[Array.setcolumn()|setcolumn ]] || Column, ColumnValues || | ||
|- | |- | ||
− | | [[Array.setheadings()|setheadings ]] || || | + | | [[Array.setheadings()|setheadings ]] || HeaderArray|Header List as Parameters || Sets the headings of this array with the parameters given. |
|- | |- | ||
| [[Array.setrow()|setrow ]] || Row, Array || | | [[Array.setrow()|setrow ]] || Row, Array || | ||
Line 535: | Line 598: | ||
| [[Array.shiftlevel()|shiftlevel ]] || Level, NumberOfTimes || | | [[Array.shiftlevel()|shiftlevel ]] || Level, NumberOfTimes || | ||
|- | |- | ||
− | | [[Array.shuffle()|shuffle ]] || || | + | | [[Array.shuffle()|shuffle ]] || || shuffle the array randomly. |
|- | |- | ||
| [[Array_nth_Functions|sixteenth ]] || SomeCount || Pick the SomeCount of items from sixteenth position | | [[Array_nth_Functions|sixteenth ]] || SomeCount || Pick the SomeCount of items from sixteenth position | ||
Line 541: | Line 604: | ||
| [[Array_nth_Functions|sixth ]] || SomeCount || Pick the SomeCount of items from sixth position | | [[Array_nth_Functions|sixth ]] || SomeCount || Pick the SomeCount of items from sixth position | ||
|- | |- | ||
− | | [[Array.size()|size ]] || || | + | | [[Array.size()|size ]] || || Give the size of this array for each dimension. |
|- | |- | ||
| [[Array.size2d()|size2d ]] || || | | [[Array.size2d()|size2d ]] || || | ||
|- | |- | ||
− | | [[Array.slices()|slices ]] || SliceExpression || | + | | [[Array.slices()|slices ]] || SliceExpression, KeepSplitValue, IgnoreRepeats || Splits array with matches, keep matches or not in the split array, treat repeat matches as one match or repeats |
|- | |- | ||
| [[Array.slides()|slides ]] || || | | [[Array.slides()|slides ]] || || | ||
|- | |- | ||
− | | [[Array.some()|some ]] || || | + | | [[Array.some()|some ]] ||callback[, thisArg || Tests whether some element in the array passes the test implemented by the provided function. |
|- | |- | ||
| [[Array.sortrecursively()|sortrecursively ]] || || | | [[Array.sortrecursively()|sortrecursively ]] || || | ||
|- | |- | ||
| [[Array.sortwith()|sortwith ]] || || | | [[Array.sortwith()|sortwith ]] || || | ||
+ | |- | ||
+ | | [[Array.sortbykey()|sortbykey ]] || || Sorts the array by the specified key. | ||
|- | |- | ||
| [[Array.specialprint()|specialprint ]] || Trimmed,TabLevel || | | [[Array.specialprint()|specialprint ]] || Trimmed,TabLevel || | ||
|- | |- | ||
− | | [[Array.spliteach()|spliteach ]] || SplitExpression, RetainSplitterAlsoInResult || | + | | [[Array.spliteach()|spliteach ]] || SplitExpression, RetainSplitterAlsoInResult || Finds the removes the character/text from the array elements and removes the same. |
|- | |- | ||
− | | [[Array.splitwhile()|splitwhile ]] || || | + | | [[Array.splitwhile()|splitwhile ]] || || Same as [[Array.partitiononcondition()]] |
|- | |- | ||
− | | [[Array.splitwhileasvector()|splitwhileasvector ]] || || | + | | [[Array.splitwhileasvector()|splitwhileasvector ]] || || Same as [[Array.partitiononcondition()]] |
|- | |- | ||
− | | [[Array.stringlist()|stringlist ]] || || | + | | [[Array.stringlist()|stringlist ]] || || Displays the array elements as strings. |
|- | |- | ||
| [[Array.subtract|subtract ]] || Thing || Subtract Thing to Array | | [[Array.subtract|subtract ]] || Thing || Subtract Thing to Array | ||
Line 571: | Line 636: | ||
| [[Array.suchthatasvector()|suchthatasvector ]] || || Filter an array with a condition (same as filteroncondition) at top array level | | [[Array.suchthatasvector()|suchthatasvector ]] || || Filter an array with a condition (same as filteroncondition) at top array level | ||
|- | |- | ||
− | | [[Array.suffix()|suffix ]] || | + | | [[Array.suffix()|suffix ]] || Suffix || Add a suffix to every element in an array |
|- | |- | ||
− | | [[Array.transpose()|t ]] || | + | | [[Array.stride()|stride]] || SomeWidth, SomeStride, SomeFunction,SomeFullPiecesOnly || Same as Array.pieces, but index steps by strides. stride or width can be negative, and will reverse the array before processing. |
+ | |- | ||
+ | | [[Array.transpose()|t ]] || IncludeHeader || Transpose an array | ||
|- | |- | ||
| [[Array.table()|table ]] || || Convert array to an html table | | [[Array.table()|table ]] || || Convert array to an html table | ||
Line 597: | Line 664: | ||
| [[Array.tofunctions()|tofunctions ]] || || | | [[Array.tofunctions()|tofunctions ]] || || | ||
|- | |- | ||
− | | [[Array.transpose()|transpose ]] || IncludeHeader || | + | | [[Array.transpose()|transpose ]] || IncludeHeader || Transpose an array |
|- | |- | ||
| [[Array.truefalse()|truefalse ]] || IsCheckTrueFunctionList, IsCheckFalseFunctionList, DoFlattenFirst || | | [[Array.truefalse()|truefalse ]] || IsCheckTrueFunctionList, IsCheckFalseFunctionList, DoFlattenFirst || | ||
Line 619: | Line 686: | ||
| [[Array.unwrapleaf()|unwrapleaf ]] || || | | [[Array.unwrapleaf()|unwrapleaf ]] || || | ||
|- | |- | ||
− | | [[Array.unzip()|unzip ]] || | + | | [[Array.unzip()|unzip ]] || OtherArray || Split alternate elements into separate array. |
|- | |- | ||
| [[Array.value()|value ]] || Function || | | [[Array.value()|value ]] || Function || | ||
Line 629: | Line 696: | ||
| [[Array.withouttail()|withouttail ]] || || | | [[Array.withouttail()|withouttail ]] || || | ||
|- | |- | ||
− | | [[Array.X$()|X$ ]] || || Combines two arrays using an across operation in reverse. Opposite of .$X | + | | [[Array.X$()|X$ ]] ||SomeArray || Combines two arrays using an across operation in reverse. Opposite of .$X |
|- | |- | ||
| [[Array.x$()|x$ ]] || FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso,DoCentering || Apply a function array to the array, with offsets and scales applied, with indices or centering as requested | | [[Array.x$()|x$ ]] || FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso,DoCentering || Apply a function array to the array, with offsets and scales applied, with indices or centering as requested | ||
|- | |- | ||
− | | [[Array.xy()|xy ]] || | + | | [[Array.xy()|xy ]] || Function, OffsetArray, ScaleArray,GiveIndicesAlso,DoCentering || Apply a function array to the array, with offsets and scales applied, with indices |
|- | |- | ||
| [[Array.xypanel()|xypanel ]] || FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso || Apply a function array to the array, with offsets and scales applied, with indices, centered by default at 0. Useful to create contour panels with inputs to apply functions on. | | [[Array.xypanel()|xypanel ]] || FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso || Apply a function array to the array, with offsets and scales applied, with indices, centered by default at 0. Useful to create contour panels with inputs to apply functions on. | ||
Line 646: | Line 713: | ||
|} | |} | ||
+ | |||
+ | ==Combinator Functions== | ||
+ | |||
+ | Array.$fns takes an array of functions and creates combinator pipe. | ||
+ | |||
+ | Array.$combinators takes take the name of a combinator and generate a function with that combinator behavior. These are globalized with λ prefix. For example, B Combinator is λB in global space. |
Latest revision as of 19:42, 29 July 2024
ARRAY FUNCTIONS
A listing of the Array functions are given below:
Every Array Member Function is also globalized with the same name but with Uppercase First Letter. For example, .chunks has a twin Global called Chunks, which take first parameter as an array, and followed with the exact same parameters of the original member function. Hence Chunks(Array,ChunkSize) will work the same. If there is an existing function with a similar name, then the globalized name will have a $x appended to it. For example, .map is also available as Map$x.
Quick Reference: Array.R = Array.reduce Array.M = Array.map Array.F = Array.filter
Function name Parameter
Function Name | Parameters | Notes |
---|---|---|
$ | Function/Array of Functions | Apply functions to each element of array |
$$ | Function/Array of Functions | Apply functions to each row of array |
$$$ | Function/Array of Functions | Apply functions to each column of array |
$$F | Function/Array of Functions | Append results of functions to each row |
$A | Parameter | Get attributes from an array of objects |
$C | Column Array to apply, Function/Array of Functions, Optional Parameters | Apply a function with parameters to a column |
$CELLS | Row/Column Area indices and width and height to apply (l,t,w,h), Function/Array of Functions, Optional Parameters | Apply a function with parameters to a cell area |
$d | Same as Array.$diag | |
$diag | Apply function to the proper diagonal of an array | |
$dth | Apply function to dth diagonal of an array | |
diagonal | Get the nth diagonal of an array | |
$R | Row Array to apply, Function/Array of Functions, Optional Parameters | Apply a function with parameters to a row |
$X | SomeArray | Combines two arrays using an across operation. Reverse is .X$ |
$x | SomeArray | Same as $X |
$_ | Mode, Functions, Parameters | Apply a function to the entire array as one aggregate call |
__$ | Mode, Functions, Parameters | Using a mode (value, valuebyrow, index etc), apply a function to the cells with parameters |
ac | ColCount | Add columns |
accumulate | Total | Accumulate each element with the next and give a cumulative result. Start from Total if need be. |
accumulatewith | CumulateFunction, CurrentResult | Accumulate each element with the next using the function and give a cumulative result. Start from Total if need be. |
across | OtherArray, Function | Apply the functions to each combination of cells in the two arrays |
add | Thing | Add Thing to Array |
addcolumn | NumberOfColumns | Add specified number of columns to the array |
addrow | NumberOfRows | Add specified number of rows to the array |
addsequence | InFront, StartFrom, OptionalSequenceArray | Add the sequence value to the specified column |
adjoint | Array | Adjoint of the matrix |
after | (NthOrExpOrFn, BothSides,IsCaseSpecific) | Give elements after a certain index. If Exp or Fn given for first parameter, finds a matching element, and find elements after that. Exclude the element at the index itself. |
afterx | (NthOrExpOrFn, BothSides,IsCaseSpecific) | Same as .after, but includes the element at the index. |
aggregate | Columns,Function, Params | Apply functions to columns with parameters given |
allslices | SliceSize | slices of numbers |
any | Count | Get Count elements from the array randomly |
appendfunction | Function | Adds a column which the result of this function on the remaining row. |
ar | Modify the array row/Column | |
around | (NthOrExpOrFn, Count, BothSides,IsCaseSpecific) | Give elements before and after a certain index, upto Count. If Exp or Fn given for first parameter, finds a matching element, and find elements around that. Exclude the element at the index itself. |
aroundx | (NthOrExpOrFn, BothSides,IsCaseSpecific) | Same as .around, but includes the element at the index. |
async | Iterator, CallBack | |
atindex | List of indices | Indices indicated by the parameters |
atnode | Function, SubtractByArray, ScaleByArray, DoNotShowIndices | |
backward | Function, StartValue | Backwards the given array from the start value |
before | (NthOrExpOrFn, BothSides,IsCaseSpecific) | Give elements before a certain index. If Exp or Fn given for first parameter, finds a matching element, and find elements after that. Exclude the element at the index itself. |
beforex | (NthOrExpOrFn, BothSides,IsCaseSpecific) | Same as .before, but includes the element at the index. |
bindcolumn | ||
branch | fns (default [neg, zero, positive]) | Give an array of functions (default one for negative, zero and positive with false/true for each value in the array). Any arbitrary array of functions will generate a similar array as output. -10..10.branch([LT,[EQ,GT]]) .print() |
branchvalues | SomeOnlyMatches | Give three arrays (one for negative, zero and positive) with value that matched for each value in the array. SomeOnlyMatches if true, shows only for the items that matched the condition |
buckets | An object with key frequency pairs. | |
bykey | Create an object from the array with array elements bucketed by keys from a column | |
c | Columns | Extract columns from array |
calci | Convert array to calci | |
head | Head of an array | |
cartesianproduct | IsWithoutFlatten | Create a cartesian product of the elements of the arrays. |
cdr | Tail of an array | |
cell | Row, Column, Width, Height | Cells with the specified addresses |
cells | Row, Column, Width, Height | Cells with the specified addresses. Same as cell |
checktype | TypeArray, ForceCheckOnVariables | Check if elements are of the type/typearray mentioned |
chunks | ChunkSize, Function | Chunks of size from array. Function is applied to the chunks if provided. pieces gives pieces of size starting with each element which is different. |
ci | Apply a function to column indices (same as Array.__$ in "ic" mode) | |
clean | Expression, ReplaceWith | Remove the items that match Expression and replace with ReplaceWith if provided |
clear | FillWith | Clear array and fill with FillWith if provided |
clearcopy | FillWith | Clear each element in a copy of the array |
clearrepeats | ||
clone | Clone an array | |
colconcat | AnotherArray | Concat columns |
colcount | Column Count | |
collect | Takes matches at element level | |
collectasvector | Takes matches at top level | |
collectwhile | Takes matches at element level while true | |
collectwhileasvector | Takes matches at top level while true | |
column | SomeColumns | Extract columns |
columnconcat | AnotherArray | Concat two arrays by column |
columns | SomeColumns | Extract columns |
compare | ||
concatall | LimitArray, IncludeEdges | Concatenates all the elements in an array or table row wise. |
converge | Function, NumberOfIterations, Accuracy, Converge | |
copy | Make a copy of the array | |
core | ||
count | FirstLevelOnly | |
crosstab | RowSet, ColSet,PageSet,DataSet | Returns a simple cross tabulation of two or more factors |
cube | ||
cumcolumn | Cumulate column(s) | |
cumcolumns | Cumulate column(s) | |
cumcolumnswith | Cumulate column(s) with a function | |
cumcolumnwith | Cumulate column(s) with a function | |
cumrow | Cumulate row(s) | |
cumrows | Cumulate row(s) | |
cumrowswith | Cumulate row(s) with a function | |
cumrowwith | Cumulate row(s) with a function | |
cumulate | Cumulate elements with NUMSUM | |
data | ||
dc | Which | Delete columns specified |
deal | Within, ManyInEach | Generates Random Numbers |
deepcopy | Deep copy of an array | |
deletecolumn | Which | Delete a specified or last column |
deleterow | Which | Delete a specified or last row |
det | Array | Determinant of an array |
determinant | Array | Determinant of an array |
dim | Dimensions | Create a new array with the dimensions given |
div | Thing | Divide Thing to Array |
divide | Thing | Integer Divide Thing to Array |
dr | Which | Delete a specified or last row |
drop | ||
dropwhile | Drops elements that do not match at element level | |
dropwhileasvector | Drops matches at top level | |
eighteenth | SomeCount | Pick the SomeCount of items from eighteenth position |
eighth | SomeCount | Pick the SomeCount of items from eigth position |
eleventh | SomeCount | Pick the SomeCount of items from eleventh position |
ends | SomeNth, SomeCount | Pick the SomeCount of items from SomeNth position from both sides of the array |
equal | Array, CheckLength, StartFrom | Comparing the each value in the array and gives true/false. |
equalvalues | Array, CheckLength, StartFrom | Comparison of set of arrays with its length and values without considering its order |
eval | Execute each element of the array as code | |
except | Indices | Extract the elements at indices mentioned |
exec | Parameters | Execute each element of the array as a function with given parameters |
explode | StartIndex, By, RecurseTillLevel | Explode each element into a sequence from start Index |
extract | column list | Extract specified columns |
extractslices | SliceExpression, KeepSplitValue, IgnoreRepeats | Splits array with matches, without split value or repeats of match. Useful to get the array split with a match. Similar to .splices |
few | IncludeHeader | Pick a few elements from the array randomly |
findx | fn,mode,includefalse | Applies a function and returns matches. Mode can be "INDEX", "ELEMENT", "TRUE"/"TRUTH", "VALUE","INDEXELEMENT","INDEXELEMENTVALUE", etc. includeFalse keeps false matches. |
findi | fn,includefalse | Applies a function and returns indices of matches. |
finde | fn,includefalse | Applies a function and returns elements that matched. |
findie | fn,includefalse | Applies a function and returns index and elements that matched. |
findiev | fn,includefalse | Applies a function and returns index, elements that matched and result of the match. |
findiv | fn,includefalse | Applies a function and returns index, result of the match. |
findv | fn,includefalse | Applies a function and returns result of the match. |
findt | fn,includefalse | Applies a function and returns result of the match as true or false. |
fifteenth | SomeCount | Pick the SomeCount of items from fifteenth position |
fifth | SomeCount | Pick the SomeCount of items from fifth position |
fillwith | Numbers | Fill the array with numbers provided. Repeat the numbers if fewer than size specified |
filtermatches | MatchIdenticalMatrix, OnlyMatches | |
filteroncolumn | Condition, ExtractColumns, FilterOnColumn | ExtractColumns are the columns that are extracted, and filters are applied on FilterOnColumn where condition is satisfied |
filteroncondition | TakeDropOrAllFlag, Function, Parameter | Apply a function to an array with parameters, and return list that matched/not matched/all |
filteronrow | Condition, ExtractRows, FilterOnRow | ExtractRows are the rows that are extracted, and filters are applied on FilterOnRow where condition is satisfied |
findcellref | Values | |
first | SomeCount | Pick the SomeCount of items from first position |
firstelement | SomeCount | Pick the element from first position |
firsthalf | First half of the array | |
fixat | Index, Fix | |
fjoin | HeadLength, JoinString | |
flatten | Flatten the array to a single dimension | |
flip | IncludeHeader | Same as transpose |
flipparts | Switch first and second half of an array | |
fold | AtFoldValue, AtReverseFoldValue | |
foldl | Function, StartSeed | Apply a function cumulatively to left |
foldr | Function, StartSeed | Apply a function cumulatively to right |
forward | Function, StartValue | |
fourteenth | SomeCount | Pick the SomeCount of items from fourteenth position |
fourth | SomeCount | Pick the SomeCount of items from fourth position |
fourths | Split array in four pieces | |
funcjoin | HeadLength, FindString, FirstString, MidString, LastString | |
gettype | ||
graph | Mode | |
graphin | ||
half | Give two halves of the array | |
halves | Same as half | |
head | Head of the array (Same as Array.car) | |
headings | ||
hundredth | SomeCount | Pick the SomeCount of items from hundredth position |
i | PreviousArray | Indices in an array, concatenated to the PreviousArray if provided |
ic | Functions | Apply functions to the column indices |
ids | Get ids of all objects in an array of objects if present | |
implode | RecurseTillLevel | |
inc | ||
include | ||
indexwith | ExpressionOrIndex, IsCaseSpecific | finds the first index that matches the expression. String or Regexp can be provided, or a number. |
indexanddata | Function, SubtractByArray, ScaleByArray, DoNotShowIndices, RowArray | Returns the result of applying the Function/FunctionSet to each x,y, and index location of the array, then subtracts and scales the results with SubtractByArray and ScaleByArray. |
indiceswith | ExpressionOrIndex, IsCaseSpecific | finds all indices that matches the expression. String or Regexp can be provided, or a number. |
indices | Function, SubtractByArray, ScaleByArray, DoNotShowIndices, RowArray | Returns the result of applying the Function/FunctionSet to each x,y location of the array, then subtracts and scales the results with SubtractByArray and ScaleByArray. |
injoin | JoinWith | A string with all array elements joined starting from second element |
inner | InnerSize | Give inner elements. |
insert | Value, AfterLastFlag | |
insertcolumn | Index, NumberOfColumns | |
insertrow | Index, NumberOfRows | |
inverse | Array | Calculate the inverse of this array |
ir | ||
is | Thing, IsNot | |
is1d | Check if there is One dimension | |
is2d | Check if there is Two dimension | |
isFalse | Check if there is any False | |
isfalse | Check if there is any False | |
islikelytype | ||
isnotnull | ||
isnull | ||
isTrue | Check everything is true | |
istrue | Check everything is true | |
istype | ||
ith | (Nth, Count, BothSides) | Same as .nth, but gives indices starting with 0, while nth gives numbers starting from 1. |
j | ||
joincolumnswith | ArrayOfJoinCharacters, IsRepeat | |
joinrowswith | ArrayOfJoinCharacters, IsRepeat | |
joinwith | ||
jq | ||
keep | ||
last | Count | Get Count elements from the Last element |
lastelement | Count | |
list | ||
lookup | ||
make | ||
make1to2d | ReplaceOriginal | |
makecore | ||
makekeyarray | Recursive | |
maplist | fun | |
mapper | Function | Same as $ |
maprow | Function | Same as $$ |
maplength | IncludeStringsEtc | Calculate length of each element. IncludeStringsEtc calculates the length if the element is a string also. |
mask | ||
match | Expression | |
matchcolumn | Expression, Column | |
matchindex | Expression, IndexThenFromMatch | |
matchrow | Expression, Row | |
matchvalue | Expression, IndexThenFromMatch | |
merge | OtherArray, Function | |
mergecolumns | OtherArray | |
mergeio | ||
mergerows | ||
mid | From, Count | Pick Count elements from From location onwards |
millionth | SomeCount | Pick the SomeCount of items from millionth position |
mod | Thing | Mod Thing to Array |
multiply | Thing | Multiply Thing to Array |
nicejoin | JoinString, EndString, SubArrayString | |
nineteenth | SomeCount | Pick the SomeCount of items from nineteenth position |
nineth | SomeCount | Pick the SomeCount of items from nineth position |
nodeindex | Simply gives the indices of the node. | |
notinclude | Item | |
notwithinlimits | LimitArray, IncludeEdges | |
nth | Nth, Count, IsBothSides | Pick the SomeCount of items from nth position. IsBothSides will provide results from both sides of the array. |
ntimes | Function, NumberOfIterations, Accuracy, Converge | |
nullifyobjects | Recursive | |
numbers | ForceCheckOnVariables | |
o | List of Items | Same as Array.objects() |
objects | List of Items | Returns the array of Objects in the ZSpace DOM with each element being applied with function OBJECT applied to the variable. |
of | elements | Elements used to create the array. |
op | Op with another number using units (Supported Operators %, <, >, <=, >=, ==, !=,===, FEQ Floating Equals) | |
otherthan | ArrayWithElementsToExclude | The elements except the specified elements. |
outer | OuterSize | Outer 2 elements. |
pack | Remove consecutive duplicates and compact the array. | |
pad | Length, PadString | Pad the array to be of length NewLength, and fill the extra elements added with PadString . |
pair | Value, OnRight | |
pairmatch | AtFoldValue, AtReverseFoldValue, StartFrom | Folds the array for the corresponding SomeAtFoldValue,into subarrays if the value in the array element matches the given fold value |
partitiononcondition | TakeDropOrAllFlag, Function, Parameter | |
parts | NumberOfParts, SpecificPartOrFunction | Divides the array into parts of Part Size. Applies function if provided, or provide the specific requested part such as an element at the index (2nd of 3 parts for example). NumberOfParts can be negative, and it will reverse the array before processing. |
pastefolds | MidOnly | Unfold the result of a fold. |
pick | PickMaskArray | Pick all elements that matches a true in the array mask. |
pieces | Width, Function, Stride | Split the array into pieces of Piece Size. For each piece, a function can be applied. Stride or width can be negative, and will reverse the array before processing. Example: nums = [3,6,9,1]; MAX(nums.pieces(2,MINUS@ABS)) |
pip | PathIndexArray, Length, PassThroughFunction,UseClone | Push and Insert into subarrays at pathindices given |
pipall | ExceptIndexUpto, MarkSliced | Push and Insert for all elements from index provided |
pipallwithslice | ExceptIndexUpto, MarkSliced | pipall with slices marked for later unpipping |
plot | ||
prefix | Prefix | Add a prefix to every element in an array |
primitives | Returns the primitive values of objects in the array | |
Trimmed, TabLevel | Print an array as a text string | |
printf | ||
r | Array/Parameters | Same as Array.row() |
rand | Base,Count | Same as Array.random() |
random | Base,Numbers | Fill the array with random numbers |
raw | Returns pure array without headers, input, input headers, and data indices information. | |
remove | List of Elements | Remove the elements from the original array |
removeByVal | Value | Removes the value,and changes the original array, unless Return Copy is true. |
removeindices | ||
removewith | ||
repeatntimes | Function, NumberOfIterations, Accuracy, Converge | |
replace | ExpressionArrayOrValues, ReplaceWith | |
replicate | Count | |
rest | Start, Count | Remove the part of the array from Start |
result | ||
reverse | Function, StartValue | Reverse the given array from the start value along with the original array. (Dropped) |
reversecopy | Reverse the given array from the start value along with the copy of an original array. | |
reverselevel | Level | |
reversepip | SomeExceptIndexUpto, SomeMarkSliced | Push and Insert for all elements from index provided in reverse |
reversesort | Function | Sorting the arrays in the reverse order. |
ri | Apply a function to row indices (same as Array.__$ in "ir" mode) | |
rotate | NumberOfSteps | Rotate an array NumberOfSteps times |
rotatecolumns | NumberOfSteps | Rotates columns in an array with the specified number of steps. |
rotaterows | NumberOfSteps | Rotates columns in an array with the specified number of steps. |
row | ||
rowconcat | OtherArray | Concat two arrays by row |
rowcount | Count of rows | |
rowlengths | Function | |
rowpush | OtherArray | |
rows | ||
rslice | Begin, End | Same as Array.slice() |
second | SomeCount | Pick the SomeCount of items from second position |
secondhalf | Get second half of the array | |
seq | StartIndex, By | Replaces each element in this array by a number sequence from StartIndex incremented by By |
set | ||
setaxis | Axis, ColumnValues | |
setcolumn | Column, ColumnValues | |
setheadings | Header List as Parameters | Sets the headings of this array with the parameters given. |
setrow | Row, Array | |
setunit | ||
seventeenth | SomeCount | Pick the SomeCount of items from seventeenth position |
seventh | SomeCount | Pick the SomeCount of items from seventh position |
shiftlevel | Level, NumberOfTimes | |
shuffle | shuffle the array randomly. | |
sixteenth | SomeCount | Pick the SomeCount of items from sixteenth position |
sixth | SomeCount | Pick the SomeCount of items from sixth position |
size | Give the size of this array for each dimension. | |
size2d | ||
slices | SliceExpression, KeepSplitValue, IgnoreRepeats | Splits array with matches, keep matches or not in the split array, treat repeat matches as one match or repeats |
slides | ||
some | callback[, thisArg | Tests whether some element in the array passes the test implemented by the provided function. |
sortrecursively | ||
sortwith | ||
sortbykey | Sorts the array by the specified key. | |
specialprint | Trimmed,TabLevel | |
spliteach | SplitExpression, RetainSplitterAlsoInResult | Finds the removes the character/text from the array elements and removes the same. |
splitwhile | Same as Array.partitiononcondition() | |
splitwhileasvector | Same as Array.partitiononcondition() | |
stringlist | Displays the array elements as strings. | |
subtract | Thing | Subtract Thing to Array |
suchthat | Filter an array with a condition (same as filteroncondition) | |
suchthatasvector | Filter an array with a condition (same as filteroncondition) at top array level | |
suffix | Suffix | Add a suffix to every element in an array |
stride | SomeWidth, SomeStride, SomeFunction,SomeFullPiecesOnly | Same as Array.pieces, but index steps by strides. stride or width can be negative, and will reverse the array before processing. |
t | IncludeHeader | Transpose an array |
table | Convert array to an html table | |
tablelookup | RowValueMatch, ColumnValueMatch | |
tail | ||
takewhile | Takes matches at every element | |
takewhileasvector | Takes matches at top level | |
tenth | SomeCount | Pick the SomeCount of items from tenth position |
third | SomeCount | Pick the SomeCount of items from third position |
thirds | Split array in three pieces | |
thirteenth | SomeCount | Pick the SomeCount of items from thirteenth position |
thousandth | SomeCount | Pick the SomeCount of items from thousandth position |
tofunctions | ||
transpose | IncludeHeader | Transpose an array |
truefalse | IsCheckTrueFunctionList, IsCheckFalseFunctionList, DoFlattenFirst | |
twelfth | SomeCount | Pick the SomeCount of items from twelfth position |
twentieth | SomeCount | Pick the SomeCount of items from twentieth position |
twod | ||
type | ||
uncrosstab | UptoColumn | |
unimplode | RecurseTillLevel | |
unimplodeleaf | ||
unitsof | ||
unwrapleaf | ||
unzip | OtherArray | Split alternate elements into separate array. |
value | Function | |
where | Term | |
withinlimits | LimitArray, IncludeEdges | |
withouttail | ||
X$ | SomeArray | Combines two arrays using an across operation in reverse. Opposite of .$X |
x$ | FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso,DoCentering | Apply a function array to the array, with offsets and scales applied, with indices or centering as requested |
xy | Function, OffsetArray, ScaleArray,GiveIndicesAlso,DoCentering | Apply a function array to the array, with offsets and scales applied, with indices |
xypanel | FunctionArray, OffsetArray, ScaleArray, GiveIndicesAlso | Apply a function array to the array, with offsets and scales applied, with indices, centered by default at 0. Useful to create contour panels with inputs to apply functions on. |
z3 | ||
zero | ValueInstead, PreserveStructure | Zero or replace values in an array |
zip | OtherArray | Combine two arrays into one zipped array |
ZJSON |
Combinator Functions
Array.$fns takes an array of functions and creates combinator pipe.
Array.$combinators takes take the name of a combinator and generate a function with that combinator behavior. These are globalized with λ prefix. For example, B Combinator is λB in global space.