Description Usage Arguments Value Examples
Generate Power Function, Stepped, and Cyclic Sequences
1 2 3 4 5 6 7 |
from |
Numeric. Number to interpolate from. For |
to |
Numeric. Number to interpolate to. For |
n |
Numeric. Length of sequence. Equvalent of |
step.n |
Numeric. Step length, in same units as |
exponent |
Numeric. Exponent of power function used to interpolate betwwen |
cyc.from |
Numeric. Number to interpolate from, for each cycle to be imposed on trend. |
cyc.to |
Numeric. Number to interpolate to, for each cycle to be imposed on trend. |
cyc.n |
Numeric. Length of cycle, in same units as |
cyc.exponent |
Numeric. Exponent of power function used to interpolate betwwen |
operator |
Character. |
Numeric vector
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | s <- rampx(0,1,101)
stepped_s <- stepx(0,1,101,step.n = 10)
plot(s,type="l")
points(stepped_s,type="p",pch=20)
s <- rampx(0,1,101,exp=2)
stepped_s <- stepx(0,1,101,step.n = 20,exp=2)
plot(s,type="l")
points(stepped_s,type="p",pch=20)
s <- stepx(0,1,101,step.n=20)
cycled_s <- cyclx(0,1,101,step.n = 20,cyc.from=0.5,cyc.to=1,cyc.n=20,cyc.exponent = 1)
plot(cycled_s,type="p",pch=19,col="red",ylim=c(0,1))
points(s,type="p",pch=20)
stepped_s <- stepx(0,1,101,step.n = 20,exp=.5)
cycled_s <- cyclx(0,1,101,step.n = 20,exp=.5,cyc.from=0,cyc.to=1,cyc.n=20,cyc.exponent=1)
plot(cycled_s,type="p",pch=19,col="red")
points(stepped_s,type="p",pch=20)
stepped_s <- stepx(0,1,101,step.n=10,exp=2)
cycled_s <- cyclx(0,1,101,step.n=10,exp=2,cyc.from=0,cyc.to=1,cyc.n=10,cyc.exponent=2,operator="+")
plot(cycled_s,type="p",pch=19,col="red")
points(stepped_s,type="p",pch=20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.