View source: R/shift_to_breast_height.R
shift_to_breast_height | R Documentation |
Shift a height trajectory function to age at breast height 1.3m
shift_to_breast_height(
height_trajectory,
dominant_height,
age,
age2,
interval_low = 0,
interval_high = 10,
...
)
height_trajectory |
A height-trajectory function containing the arguments 'dominant_height', 'age','age2','output'. |
dominant_height |
Dominant height |
age |
Age |
age2 |
Age at which to return height. |
interval_low |
Default=0,Lowest possible time to breast height. (If a function already has an intercept at breast height) |
interval_high |
Default=10, highest possible time to breast height. |
... |
A list of additional arguments passed to height_trajectory. |
Height at breast height age2.
ggplot()+
xlim(c(0,100))+
geom_function(
aes(linetype="Shift"),
fun=function(x) shift_to_breast_height(height_trajectory = Eriksson_1997_height_trajectory_Sweden_Birch,dominant_height = 17,reference_age = 40,age2 = x)
)+
geom_function(
aes(linetype="Normal"),
fun=function(x) Eriksson_1997_height_trajectory_Sweden_Birch(dominant_height = 17,age = 40,age2 = x,output = "Height")
)+
geom_point(
aes(x=40,y=17)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.