I can't find my function in package R
I made a function in R and included it in my package I made. I clicked on clean and rebuild and soon after I did a check. Also, my function has been exported, and it appears listed in the package namespace doc. However, even then, when I open a new script and try to call the function (after opening the library) the function does not appear and R can not find it, and gets this error message:
Error in "my_function"(tbl) : could not find function "my_function".
Follows the function script below:
#' <descrição
#'
#' @encoding UTF-8
#' @description
#' Esta função distribui os grupos de repetição aninhados em novas linhas
#'
#' @encoding UTF-8
#' @param tble Tabela que contenha Grupo(s) de Repetição.
#'
#' @encoding UTF-8
#' @param separator Separador utilizado entre nomes do(s) Grupo(s) de
#' Repetição
#' o nome da variável. O valor default é: '/'.
#'
#' @importFrom stringr str_detect
#'
#' @encoding UTF-8
#' @return Tibble contendo valores do(s) Grupo(s) de Repetição reorganizados
#' @export
#'
#' @author -----------------------------
#' @author -----------------------------
#'
#'
rearrange_nestgroup <- function(tble, separator = '/') {
final_tble <- rearrange_repgroup(tble)
tble_colnames <- colnames(final_tble)
if (any(str_detect(tble_colnames, '\\[\\d{1,6}\\]')) == TRUE) {
rearrange_nestgroup(final_tble)
} else {
return(final_tble)
}
}
I would like to know if there is something wrong in the function script so that it is not exported
Obs.: the rearrange_repgroup function is in the same package with my functions
1
Author: Ricardo N. F. Castro, 2020-02-04