popedGetMultipleEndpointModelingTimes | R Documentation |
This function takes a vector of times and a corresponding vector of IDs, groups the times by their IDs, initializes an internal C++ global TimeIndexer, that is used to efficiently lookup the final output from the rxode2 solve and then returns the sorted unique times.
The popedMultipleEndpointIndexDataFrame()
function can be used
to visualize the internal data structure inside R, but it does
not show all the indexes in the case of time ties for a given
ID. Rather it shows one of the indexs and the total number of
indexes in the data.frame
popedGetMultipleEndpointModelingTimes(times, modelSwitch, sorted = FALSE)
popedMultipleEndpointIndexDataFrame(print = FALSE)
times |
A numeric vector of times. |
modelSwitch |
An integer vector of model switch indicator corresponding to the times |
sorted |
A boolean indicating if the returned times should be sorted |
print |
boolean for |
A numeric vector of unique times.
times <- c(1.1, 1.2, 1.3, 2.1, 2.2, 3.1)
modelSwitch <- c(1, 1, 1, 2, 2, 3)
sortedTimes <- popedGetMultipleEndpointModelingTimes(times, modelSwitch, TRUE)
print(sortedTimes)
# now show the output of the data frame representing the model
# switch to endpoint index
popedMultipleEndpointIndexDataFrame()
# now show a more complex example with overlaps etc.
times <- c(1.1, 1.2, 1.3, 0.5, 2.2, 1.1, 0.75,0.75)
modelSwitch <- c(1, 1, 1, 2, 2, 2, 3, 3)
sortedTimes <- popedGetMultipleEndpointModelingTimes(times, modelSwitch, TRUE)
print(sortedTimes)
popedMultipleEndpointIndexDataFrame(TRUE) # Print to show individual matching
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.