Description Usage Arguments Value Author(s) Examples
Function to evaluate polynomials in a numerical robust way using the Horner scheme
1 |
x |
numerical values at which to evaluate polynomials, can be provided in a vector, matrix, array or data frame |
beta |
numerical vector containing the coefficient of the polynomial |
The result of evaluating the polynomial at the values in x
,
returned in the same dimension as x
has.
Berwin A Turlach <Berwin.Turlach@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Loading required package: quadprog
[1] 1 4 9 16 25 36 49 64 81 100 121
num [1:11] 1 4 9 16 25 36 49 64 81 100 ...
[,1] [,2]
[1,] 1 121
[2,] 4 100
[3,] 9 81
[4,] 16 64
[5,] 25 49
[6,] 36 36
[7,] 49 25
[8,] 64 16
[9,] 81 9
[10,] 100 4
[11,] 121 1
num [1:11, 1:2] 1 4 9 16 25 36 49 64 81 100 ...
x y
1 1 121
2 4 100
3 9 81
4 16 64
5 25 49
6 36 36
7 49 25
8 64 16
9 81 9
10 100 4
11 121 1
'data.frame': 11 obs. of 2 variables:
$ x: num 1 4 9 16 25 36 49 64 81 100 ...
$ y: num 121 100 81 64 49 36 25 16 9 4 ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.