numerical values at which to evaluate the curvature of
polynomials, can be
provided in a vector, matrix, array or data frame
beta
numerical vector containing the coefficient of the
polynomial
Value
The result of evaluating the curvature of the polynomial at the values
in x,
returned in the same dimension as x has.
Author(s)
Berwin A Turlach
Examples
beta <- c(1,2,1)
x <- 0:10
curvPol(x, beta)
str(curvPol(x, beta))
x <- cbind(0:10, 10:0)
curvPol(x, beta)
str(curvPol(x, beta))
x <- data.frame(x=0:10, y=10:0)
curvPol(x, beta)
str(curvPol(x, beta))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MonoPoly)
Loading required package: quadprog
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MonoPoly/curvPol.Rd_%03d_medium.png", width=480, height=480)
> ### Name: curvPol
> ### Title: Evaluating the Curvature of Polynomials
> ### Aliases: curvPol
> ### Keywords: utilities regression
>
> ### ** Examples
>
> beta <- c(1,2,1)
>
> x <- 0:10
> curvPol(x, beta)
[1] 0.1788854382 0.0285336029 0.0088864317 0.0038164534 0.0019703707
[6] 0.0011454549 0.0007233203 0.0004854341 0.0003413540 0.0002490654
[11] 0.0001872481
> str(curvPol(x, beta))
num [1:11] 0.17889 0.02853 0.00889 0.00382 0.00197 ...
>
> x <- cbind(0:10, 10:0)
> curvPol(x, beta)
[,1] [,2]
[1,] 0.1788854382 0.0001872481
[2,] 0.0285336029 0.0002490654
[3,] 0.0088864317 0.0003413540
[4,] 0.0038164534 0.0004854341
[5,] 0.0019703707 0.0007233203
[6,] 0.0011454549 0.0011454549
[7,] 0.0007233203 0.0019703707
[8,] 0.0004854341 0.0038164534
[9,] 0.0003413540 0.0088864317
[10,] 0.0002490654 0.0285336029
[11,] 0.0001872481 0.1788854382
> str(curvPol(x, beta))
num [1:11, 1:2] 0.17889 0.02853 0.00889 0.00382 0.00197 ...
>
>
> x <- data.frame(x=0:10, y=10:0)
> curvPol(x, beta)
x y
1 0.1788854382 0.0001872481
2 0.0285336029 0.0002490654
3 0.0088864317 0.0003413540
4 0.0038164534 0.0004854341
5 0.0019703707 0.0007233203
6 0.0011454549 0.0011454549
7 0.0007233203 0.0019703707
8 0.0004854341 0.0038164534
9 0.0003413540 0.0088864317
10 0.0002490654 0.0285336029
11 0.0001872481 0.1788854382
> str(curvPol(x, beta))
'data.frame': 11 obs. of 2 variables:
$ x: num 0.17889 0.02853 0.00889 0.00382 0.00197 ...
$ y: num 0.000187 0.000249 0.000341 0.000485 0.000723 ...
>
>
>
>
>
> dev.off()
null device
1
>