Learn R Programming

⚠️There's a newer version (0.3.2) of this package.Take me there.

abjutils

Overview

abjutils is a toolkit with some useful functions widely used by the Brazilian Jurimetrics Association. Most functions help deal with lawsuit identification numbers (unified by CNJ, the National Council of Justice), while the rest are supposed to help ASCII-compliance and other formatting issues.

To install this package, simply run:

# To install CRAN version
install.packages("abjutils")

# To install GitHub (dev) version
install.packages("devtools")
devtools::install_github("abjur/abjutils")

Usage

abjutils has many functions, but the most useful are listed below

  • rm_accent: removes diacritics from a string

  • escape_unicode: replaces accented characters by their unicode-escaped values

(also an add-in)

  • pvec: a safe and protected vectorizer useful for things such as web scrapers

Citations

To cite this package, use citation("abjutils"):

To cite package ‘abjutils’ in publications use:

  Julio Trecenti and Fernando Correa (2014). abjutils:
  Useful Tools for Jurimetrical Analysis Used by the
  Brazilian Jurimetrics Association. R package version
  0.0.1. https://github.com/abjur/abjutils

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {abjutils: Useful Tools for Jurimetrical Analysis Used by the Brazilian Jurimetrics Association},
    author = {Julio Trecenti and Fernando Correa},
    year = {2014},
    note = {R package version 0.0.1},
    url = {https://github.com/abjur/abjutils},
  }

Copy Link

Version

Install

install.packages('abjutils')

Monthly Downloads

615

Version

0.2.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Caio Lente

Last Published

February 7th, 2019

Functions in abjutils (0.2.3)

precision

Mirror of scales:::precision()
build_id

Add separators to lawsuit IDs
gather_subjects

Gather subjects from esaj::cjsg_table("subjects")
file_sans_ext

Extract file name without extension
write_data

Shortcut to write file to "data/" directory from a pipe
clean_cnj

Clean a cnj number.
extract_parts

Extract different parts from lawsuit ID
pattern_cnj

Regex pattern for finding lawsuit numbers
calc_dig

Calculate digits for Brazilian lawsuit identification numbers
lsos

Improved list of objects
tabela

Produce frequency and relative frequency tables
test_fun

Tests a function by checking if its arguments are declared
clean_id

Remove separators from lawsuit IDs
sample_cnj

Generate sample Brazilian lawsuit identification numbers
separate_cnj

Separate a lawsuit ID column into its parts
reais

Convert brazilian currency values (text) to numeric
rm_accent

Remove accentuation
use_pipe

Add pipe template
verify_cnj

Validate Brazilian lawsuits identification number on vectorial scale.
carf_build_id

Add separators to CARF lawsuits
carf_calc_dig

Calculate check digit for CARF
pvec

Verbose, parallel, and safe map-like
escape_unicode

Escape accented characters in a document
check_dig_vet

Validate check digits for Brazilian lawsuits identification number on vectorial scale.
carf_check_dig

Validate check digits for Brazilian lawsuits identification number
check_dig

Validate check digits for Brazilian lawsuits identification number
chrome_to_body

Convert Chrome's Query String Parameters to a list