stats::quadratic
-- the
quadratic meanstats::quadratic
(data)
returns the
quadratic mean of the data.
stats::quadratic(x1, x2, ..)
stats::quadratic([x1, x2, ..])
stats::quadratic(s <, c>)
x1, x2, .. |
- | the statistical data: arithmetical expressions. |
s |
- | a sample of domain type stats::sample . |
c |
- | an integer representing a column index of the sample
s . This column provides the data x1 ,
x2 etc. |
an arithmetical expression.
stats::a_quantil
,
stats::geometric
,
stats::harmonic
,
stats::mean
, stats::median
, stats::modal
, stats::stdev
, stats::variance
c
is optional, if the data are given
by a stats::sample
object containing only one non-string column. Cf. example 3.We calculate the quadratic mean of three values:
>> stats::quadratic(a, b, c)
/ 2 2 2 \1/2 | a b c | | -- + -- + -- | \ 3 3 3 /
Alternatively, the data may be passed as a list:
>> stats::quadratic([2, 3, 5])
1/2 1/2 3 38 ---------- 3
We create a sample:
>> stats::sample([[a1, b1, c1], [a2, b2, c2]])
a1 b1 c1 a2 b2 c2
The quadratic mean of the second column is:
>> stats::quadratic(%, 2)
/ 2 2 \1/2 | b1 b2 | | --- + --- | \ 2 2 /
We create a sample consisting of one string column and one non-string column:
>> stats::sample([["1996", 1242], ["1997", 1353], ["1998", 1142]])
"1996" 1242 "1997" 1353 "1998" 1142
We compute the quadratic mean of the second column. In this case this column does not have to be specified, since it is the only non-string column:
>> float(stats::quadratic(%))
1248.644198