get_name_value_probdistrb_def {packDAMipd} | R Documentation |
Function to return the two parameters from a given expression separated by comma,
Description
Function to return the two parameters from a given expression separated by comma,
Usage
get_name_value_probdistrb_def(expr)
Arguments
expr |
an expression |
Details
It will return the parameters of the distribution separated by commas and given in usual notation as brackets. It will identify those in between first occurrence of "( "and last occurrence of ")" and from the characters in between search for comma to indicate different parameters then it will extract (from those extracted parameters separated by commas) that on the left side of "equal" sign get_name_value_probdistrb_def("gamma(mean = sqrt(2), b =17)") will be ok but get_name_value_probdistrb_def("gamma(shape, scale")) and get_name_value_probdistrb_def("gamma(shape =1 & scale =1")) will show error
Value
parameters in the expression expr
Examples
get_name_value_probdistrb_def("gamma(mean = 10, sd =1)")
[Package packDAMipd version 1.1.0 Index]