-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- uses: r-lib/actions/check-r-package@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
output: github_document | ||
--- | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
```{r, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
``` | ||
|
||
# validinsee | ||
|
||
<!-- badges: start --> | ||
![GitHub top language](https://img.shields.io/github/languages/top/InseeFrLab/validinsee) | ||
[![R-CMD-check](https://github.com/InseeFrLab/validinsee/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/InseeFrLab/validinsee/actions/workflows/R-CMD-check.yaml) | ||
[![CRAN status](https://www.r-pkg.org/badges/version/validinsee)](https://cran.r-project.org/package=validinsee) | ||
<!-- badges: end --> | ||
|
||
Le package R **validinsee** permet de valider certaines données produites par | ||
l'Insee, en particulier la conformité de numéros Siren ou Siret. | ||
|
||
## Installation | ||
|
||
``` r | ||
# install.packages("remotes") | ||
devtools::install_github("InseeFrLab/validinsee") | ||
``` | ||
|
||
## Chargement | ||
|
||
```{r} | ||
library(validinsee) | ||
``` | ||
|
||
## Validité de numéros SIREN ou SIRET | ||
|
||
Utiliser la fonction `validation_sirene` pour vérifier si les éléments du | ||
vecteur sont des **SIRET** valides (identifiant de l'établissement formé de 14 | ||
caractères) : | ||
|
||
```{r valid_siret} | ||
validation_sirene(c("20003452800014", "20003452800041", NA)) | ||
``` | ||
|
||
Pour vérifier que les éléments sont des **SIREN** valides (identifiant de | ||
l'entreprise formé de 9 caractères), préciser l'argument `type = "siren"` : | ||
|
||
```{r valid_siren} | ||
validation_sirene(c("200034528", "200034582", NA), type = "siren") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
<!-- README.md is generated from README.Rmd. Please edit that file --> | ||
|
||
# validinsee | ||
|
||
<!-- badges: start --> | ||
|
||
![GitHub top | ||
language](https://img.shields.io/github/languages/top/InseeFrLab/validinsee) | ||
[![R-CMD-check](https://github.com/InseeFrLab/validinsee/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/InseeFrLab/validinsee/actions/workflows/R-CMD-check.yaml) | ||
[![CRAN | ||
status](https://www.r-pkg.org/badges/version/validinsee)](https://cran.r-project.org/package=validinsee) | ||
<!-- badges: end --> | ||
|
||
Le package R **validinsee** permet de valider certaines données | ||
produites par l’Insee, en particulier la conformité de numéros Siren ou | ||
Siret. | ||
|
||
## Installation | ||
|
||
``` r | ||
# install.packages("remotes") | ||
devtools::install_github("InseeFrLab/validinsee") | ||
``` | ||
|
||
## Chargement | ||
|
||
``` r | ||
library(validinsee) | ||
``` | ||
|
||
## Validité de numéros SIREN ou SIRET | ||
|
||
Utiliser la fonction `validation_sirene` pour vérifier si les éléments | ||
du vecteur sont des **SIRET** valides (identifiant de l’établissement | ||
formé de 14 caractères) : | ||
|
||
``` r | ||
validation_sirene(c("20003452800014", "20003452800041", NA)) | ||
#> [1] TRUE FALSE NA | ||
``` | ||
|
||
Pour vérifier que les éléments sont des **SIREN** valides (identifiant | ||
de l’entreprise formé de 9 caractères), préciser l’argument | ||
`type = "siren"` : | ||
|
||
``` r | ||
validation_sirene(c("200034528", "200034582", NA), type = "siren") | ||
#> [1] TRUE FALSE NA | ||
``` |