#' Extrai partes ou somente detalhes da tibble detalhes
#'
#' @param df tibble criada a partir da função ler_detalhes_stj
#' @param dados informar se "partes" ou "detalhes'
#' Default: "partes"
#'
#' @return tibble
#' @export
#'
#' @examples
#' \dontrun{
#' partes <- extrair_partes_detalhes(df,dados="partes")
#' }
stj_extrair_partes_detalhes <- function(df = NULL, dados = c("partes","detalhes")){
dados <- magrittr::extract(dados,1)
detalhes<-c("PROCESSO:",
"LOCALIZA\u00c7\u00c3O:", "TIPO:", "AUTUA\u00c7\u00c3O:", "N\u00daMERO \u00daNICO:",
"RELATOR(A):", "RAMO DO DIREITO:", "ASSUNTO(S):", "TRIBUNAL DE ORIGEM:",
"N\u00daMEROS DE ORIGEM:", "", "\u00daLTIMA FASE:",
"T. ORIGEM :", "UF :", "A.CENTRAL :")
if (dados == "partes"){
dplyr::filter(df, !is.element(variavel,detalhes))
} else {
dplyr::filter(df, is.element(variavel,detalhes))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.