Description Usage Arguments Value Examples
This function takes a series of 'x,y' coordinates and a specified 'y' baseline value. For any two sequential x-coordinate points, where the 'y' baseline value is crossed in between them, the function calculates the predicted x-coordinate value and interpolates that point with the matching 'y' baseline value. The new points are then added to the original set of 'x,y' coordinates. Note that all the prefixed arse functions automatically perform this operation within their respective functions.
1 | getintersectx(data, xcoord, ycoord, ybase = NA)
|
data |
A dataframe with x- and y-coordinates in wide format. |
xcoord |
A specified selection of the x-coordinate values within the dataframe. |
ycoord |
A specified selection of the y-coordinate values within the dataframe. |
ybase |
A specified selection of the baseline of the 'y' measured variable. Users are advised to place baseline as the first instance of the y-coordinate values. Function defaults to use the first y-coordinate value in the series. |
A dataframe of old and newly-interpolated x-coordinate values at the specified baseline.
1 2 3 4 | xc <- t(c(1,2,3,4,5,6,7,8,9,10))
yc <- t(c(75,53,37,25,95,35,50,75,75,75))
dataset1 <- data.frame(xc, yc)
getintersectx(data = dataset1, xcoord = dataset1[,1:10], ycoord = dataset1[,11:20])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.