This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: Mandelbrot Set (Mandelbrot) | |
Description: Generates a Mandelbrot set based on given assumptions that can be used with conditional formatting to view the visual representation. | |
Parameters: | |
xleft - Left X value | |
xright - Right X value | |
ytop - Top Y value | |
ybottom - Bottom Y value | |
size - number of columns/rows in square output range | |
iterations - number of iterations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* USE NAMESPACE "Record" */ | |
Field = LAMBDA(_record, _field, | |
LET( | |
fieldnames, Record.FieldNames(_record), | |
fieldcol, List.PositionOf(fieldnames, _field), | |
INDEX(_record, 2, fieldcol) | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* USE NAMESPACE "Table" */ | |
Item = LAMBDA(_table, _index, | |
MAKEARRAY( | |
2, | |
COLUMNS(_table), | |
LAMBDA(ir, ic, CHOOSE(ir, INDEX(_table, 1, ic), INDEX(_table, _index + 1, ic))) | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* USE NAMESPACE "List" */ | |
Accumulate = LAMBDA(_list, _seed, _accumulator, REDUCE(_seed, _list, _accumulator)); | |
AllTrue = LAMBDA(_list, AND(_list)); | |
AnyTrue = LAMBDA(_list, OR(_list)); | |
Average = LAMBDA(_list, AVERAGE(_list)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ROOTS OF FUNCTIONS */ | |
BISEC = LAMBDA(f, lbound, ubound, [prec], | |
LET( | |
c, (lbound + ubound) / 2, | |
fl, f(lbound), fu, f(ubound), fc, f(c), | |
IF( | |
ABS(fc) < MAX(prec, 1E-15), | |
c, | |
IF( | |
SIGN(fl) = SIGN(fc), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FUNCTION NAME: CrtIdxλ | |
DESCRIPTION:*/ /**Creates an array of indexes that can be used with INDEX() can combine | |
all rows in all tables as would a database 'Natrual Join' or 'Cross Join.'*/ | |
/* This was developed for multidimensional modeling. A key to multidimensional modeling | |
is the ability to combine all instances of all dimensions, and then access each | |
dimension's value. A dimension is a category of things like: | |
Customers, Products, Regions, Months, etc. | |
When faced with the situation where each dimension has a piece of information needed | |
for a particular calculation such as: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// video explaining all these formulas: https://youtu.be/yO8zX_Ivcug | |
// see video: https://youtu.be/P8knGhzV7uk | |
ListTable = LAMBDA(array, | |
LET(one,TAKE(array,,1),two,TAKE(array,,-1), | |
list,UNIQUE(one), | |
HSTACK(list,BYROW(list,LAMBDA(x,TEXTJOIN(", ",TRUE,FILTER(two,one=x))))))); | |
// see video: https://youtu.be/lli7MTilTB8 | |
repeatXtimes = LAMBDA(array,num_repeat, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: Unpivot Table (UNPIVOT) | |
Description: Given a table range with headers and array of header names, unpivots the | |
specified columns in place, optionally removing any blank entries. | |
Written By: Excel Robot (@ExcelRobot) | |
Category: Array | |
*/ | |
UNPIVOT=LAMBDA(table,[columns_to_unpivot],[attribute_name],[value_name],[remove_blanks], LET( | |
_ColumnsToUnpivot, IF( | |
ISOMITTED(columns_to_unpivot), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
OUTLIERS | |
These lambda functions allow us to quickly apply the standard deviation test to a series of transformed variables | |
Included in this file: | |
OUTLIER.THRESHOLDS - for calculating outlier thresholds using a standard deviation test | |
inputs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpreg1 = LAMBDA(temp, press, | |
LET( | |
tau, 1386 / temp, | |
pi, 0.1 * press / 16.53, | |
-0.001 * rgas_water * tau ^ 2 * gammatautaureg1(tau, pi) | |
) | |
); | |
cpreg2 = LAMBDA(temp, press, | |
LET( |
NewerOlder