I would like to document an R function and inherit individual parameter documentation from other functions when multiple parameter names match. For example, lets say I have the following 2 functions.
#' Function 1.
#'
#' Description of function 1.
#'
#' @param x XYZ
#' @param y ZYX
#' @return Numeric
fun1 <- function(x, y) {value <- 1}
#' Function 2.
#'
#' Description of function 2.
#'
#' @param x ABC
#' @param y CBA
#' @return Numeric
fun2 <- function(x, y) {value <- 2}
I now want to create a third function that inherits parameter x from fun1 and parameter y from fun2. The following do not work:
#' Function 3.
#'
#' Description of function 3.
#'
#' @inherit fun1 params x
#' @inherit fun2 params y
fun3 <- function(x, y) {value <- 3}
#' Function 3.
#'
#' Description of function 3.
#'
#' @inheritParams fun1 x
#' @inheritParams fun2 y
fun3 <- function(x, y) {value <- 3}
If you do the following then both parameters are inherited from fun1:
#' Function 3.
#'
#' Description of function 3.
#'
#' @inheritParams fun1
#' @inheritParams fun2
fun3 <- function(x, y) {value <- 3}
I'm not sure what else to try or if this is even possible?