This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathaverage.lcdoc
More file actions
64 lines (41 loc) · 1.71 KB
/
average.lcdoc
File metadata and controls
64 lines (41 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Name: average
Synonyms: avg, arithmeticmean, mean
Type: function
Syntax: average(<numbersList>)
Summary:
<return|Returns> the arithmetic mean of a list of numbers.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
average(4,36,45,50,75) -- returns 42
Example:
put average(importedList) into field "Arithmetic Mean"
Example:
put average(replaceText(field "Values",return,comma)) into avgValue
Parameters:
numbersList:
A comma-separated list of numbers, or an expression that evaluates to
such a list, or an array containing only numbers.
Returns:
The <average> function <return|returns> a number.
Description:
Use the <average> <function> to find the <value(function)> that best
represents a group of <value(glossary)|values>.
The average of a list of numbers is the sum of the items in the list or
elements in the array, divided by the number of items or elements.
The <average> <function> can also be written like this:
sum(numbersList)/the number of items in numbersList
If the <numbersList> is empty, the <average> <function> returns zero.
If a math operation on finite inputs produces a non-finite output, an
execution error is thrown. See <math operation|math operations> for more
information.
Changes:
The ability to use an array was introduced in version 1.1. In previous
versions, only lists of numbers could be used with the average function.
References: function (control structure), min (function),
geometricMean (function), statRound (function), harmonicMean (function),
variance (function), round (function), value (function), max (function),
median (function), standardDeviation (function), return (glossary),
value (glossary), math operation (glossary)
Tags: math