diff --git a/DESCRIPTION b/DESCRIPTION
index 6a4d1c5..30aaba6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: hetu
Type: Package
Title: Structural Handling of Finnish Personal Identity Codes
-Version: 1.0.7.9000
-Date: 2022-05-16
+Version: 1.0.7
+Date: 2022-05-20
Authors@R:
c(
person(given = "Pyry",
@@ -37,7 +37,7 @@ License: BSD_2_clause + file LICENSE
VignetteBuilder: knitr
Encoding: UTF-8
BugReports: https://github.com/ropengov/hetu/issues
-URL: https://ropengov.github.io/hetu, https://github.com/ropengov/hetu
+URL: https://ropengov.github.io/hetu/, https://github.com/ropengov/hetu
Depends:
R (>= 3.6.0)
Imports:
diff --git a/R/hetu.R b/R/hetu.R
index 5329f47..31d502f 100644
--- a/R/hetu.R
+++ b/R/hetu.R
@@ -1,8 +1,7 @@
-#' @title Finnish personal identification number extraction
-#' @description Extract information from Finnish personal identification
-#' numbers (hetu).
-#' @param pin Finnish personal identification number as a character vector,
-#' or vector of identification numbers as a character vectors
+#' @title Generic Extraction Tool for Finnish Personal Identity Codes
+#' @description Extract embedded information from Finnish personal identity
+#' codes (hetu).
+#' @param pin Finnish personal identity code(s) as a character vector
#' @param extract Extract only selected part of the information.
#' Valid values are "\code{hetu}", "\code{sex}", "\code{p.num}",
#' "\code{ctrl.char}", "\code{date}", "\code{day}", "\code{month}",
@@ -16,28 +15,28 @@
#' "\code{correct.ctrl.char}", "\code{valid.date}", "\code{valid.day}",
#' "\code{valid.month}", "\code{valid.length}", "\code{valid.century}".
#' Default is \code{FALSE} which returns no diagnostic information.
-#' @return Finnish personal identification number data.frame,
+#' @return Finnish personal identity code data.frame,
#' or if extract parameter is set, the requested part of the
#' information as a vector. Returns an error or \code{NA} if the given
-#' character vector is not a valid Finnish personal identification number.
-#' \item{hetu}{Finnish personal identification number as a character vector.
+#' character vector is not a valid Finnish personal identity code.
+#' \item{hetu}{Finnish personal identity code as a character vector.
#' A correct pin should be in the form DDMMYYCZZZQ, where DDMMYY stands for
#' date, C for century sign, ZZZ for personal number and Q for control
#' character.}
#' \item{sex}{sex of the person as a character vector ("Male" or "Female").}
-#' \item{p.num}{Personal number part of the identification number.}
-#' \item{ctrl.char}{Control character for the personal identification number.}
+#' \item{p.num}{Personal number part of the identity code.}
+#' \item{ctrl.char}{Control character for the personal identity code.}
#' \item{date}{Birthdate.}
#' \item{day}{Day of the birthdate.}
#' \item{month}{Month of the birthdate.}
#' \item{year}{Year of the birthdate.}
#' \item{century}{Century character of the birthdate: + (1800), - (1900) or
#' A (2000).}
-#' \item{valid.pin}{Does the personal identification number pass all validity
+#' \item{valid.pin}{Does the personal identity code pass all validity
#' checks: (\code{TRUE} or \code{FALSE})}
#' @author Pyry Kantanen, Jussi Paananen
#' @seealso \code{\link{pin_ctrl}} For validating Finnish personal
-#' identification numbers.
+#' identity codes.
#' @examples
#' hetu("111111-111C")
#' hetu("111111-111C")$date
@@ -126,7 +125,7 @@ hetu <- function(pin, extract = NULL, allow.temp = FALSE, diagnostic = FALSE) {
names(checklist) <- 0:30
valid_ctrl_char_test <- extracted_ctrl_char %in% checklist
- # Get personal identification number
+ # Get personal identity code
extracted_personal_number <- substr(pin, start = 8, stop = 10)
extracted_personal_number <- formatC(extracted_personal_number,
width = 3, format = "d", flag = "0")
@@ -143,7 +142,7 @@ hetu <- function(pin, extract = NULL, allow.temp = FALSE, diagnostic = FALSE) {
extracted_sex <- ifelse(((as.numeric(extracted_personal_number) %% 2) == 0),
"Female", "Male")
- # Check if personal identification number is artificial or temporary
+ # Check if personal identity code is artificial or temporary
is_temp_test <- as.numeric(extracted_personal_number) >= 900
# Check pin number of characters
diff --git a/R/hetu_control_char.R b/R/hetu_control_char.R
index a4a0d4d..335f0bc 100644
--- a/R/hetu_control_char.R
+++ b/R/hetu_control_char.R
@@ -1,6 +1,6 @@
-#' @title Finnish Personal Identification Number Control Character Calculator
+#' @title Calculate Control Character for Personal Identity Code
#' @description Calculate a valid control character for an incomplete
-#' Finnish personal identification numbers (hetu).
+#' Finnish personal identity codes (hetu).
#' @param pin An incomplete PIN that ONLY has a date, century marker (optional,
#' see parameter with.century) and personal number
#' @param with.century If TRUE (default), the function assumes that the PIN
@@ -19,7 +19,7 @@
#' @return Control character, either a number 0-9 or a letter.
#' @author Pyry Kantanen
#' @seealso \code{\link{hetu}} For extracting information from Finnish personal
-#' identification numbers.
+#' identity codes.
#' @examples
#' hetu_control_char("010101-010")
#' hetu_control_char("010101010", with.century = FALSE)
diff --git a/R/hetu_diagnostic.R b/R/hetu_diagnostic.R
index ab0ce9c..41758ed 100644
--- a/R/hetu_diagnostic.R
+++ b/R/hetu_diagnostic.R
@@ -1,6 +1,7 @@
## hetu_diagnostic.R
-#' @title Diagnostics Tool for HETU
-#' @description Produce a data frame of PINs that may require closer scrutiny.
+#' @title Diagnostics Tool for Personal Identity Codes
+#' @description Prints information on the tests that are used
+#' to confirm or reject the validity of each personal identity code.
#' @param pin Finnish personal identification number as a character vector,
#' or vector of identification numbers as a character vectors
#' @param extract Extract only selected part of the diagnostic information.
@@ -17,6 +18,8 @@
#' hetu_diagnostic(diagnosis_example)
#' # Extract century-related checks
#' hetu_diagnostic(diagnosis_example, extract = "valid.century")
+#' @seealso \code{\link{hetu}} for the main function on which
+#' \code{hetu_diagnostic} relies on.
#'
#' @export
hetu_diagnostic <- function(pin, extract = NULL) {
diff --git a/R/pin_age.R b/R/pin_age.R
index 205824c..c5b5aef 100644
--- a/R/pin_age.R
+++ b/R/pin_age.R
@@ -1,5 +1,6 @@
-#' @title Age from ID
-#' @description Calculate the age in full years for a given date.
+#' @title Extract Age from Personal Identity Code
+#' @description Calculate age in years, months, weeks or days from
+#' personal identity codes.
#' @inheritParams hetu
#' @param date Date at which age is calculated. If a vector is provided it
#' must be of the same length as the \code{pin} argument.
diff --git a/R/pin_ctrl.R b/R/pin_ctrl.R
index 01fdd74..63544a0 100644
--- a/R/pin_ctrl.R
+++ b/R/pin_ctrl.R
@@ -1,7 +1,6 @@
-#' @title Finnish Personal Identification Number Validator
-#' @description Validate Finnish personal identification numbers (hetu).
-#' @param pin Finnish personal identification number as a character vector, or
-#' vector of identification numbers as a character vectors.
+#' @title Check Validity of Personal Identity Code
+#' @description Validate Finnish personal identity codes (hetu).
+#' @param pin Finnish personal identity code(s) as a character vector
#' @param allow.temp If TRUE, temporary PINs (personal numbers 900-999) are
#' handled similarly to regular PINs (personal numbers 002-899), meaning
#' that otherwise valid temporary PIN will return a TRUE. Default
@@ -10,7 +9,7 @@
#' Finnish personal identity codes.
#' @author Pyry Kantanen
#' @seealso \code{\link{hetu}} For extracting information from Finnish personal
-#' identification numbers.
+#' identity codes.
#' @examples
#' pin_ctrl("010101-0101") # TRUE
#' pin_ctrl("010101-010A") # FALSE
@@ -31,7 +30,7 @@ pin_ctrl <- function(pin, allow.temp = FALSE) {
#' @export
hetu_ctrl <- pin_ctrl
-#' @title Check Finnish Business ID (y-tunnus) validity
+#' @title Check Validity of Finnish Business ID (Y-tunnus)
#'
#' @description
#' A function that checks whether a \code{bid} (Finnish Business ID) is valid.
@@ -100,7 +99,7 @@ bid_ctrl <- function(bid) {
return(check)
}
-#' @title Check Finnish Unique Identification Number validity
+#' @title Check Validity of Finnish Unique Identification Number (SATU)
#'
#' @description
#' A function that checks whether a \code{satu} (Finnish Unique Identification
diff --git a/R/pin_date.R b/R/pin_date.R
index 1a77b6e..cc15f4c 100644
--- a/R/pin_date.R
+++ b/R/pin_date.R
@@ -1,5 +1,5 @@
-#' @title Get Birth date from PIN
-#' @description Calculates the date of birth in date format.
+#' @title Extract Date of Birth from Personal Identity Code
+#' @description Returns the date of birth in date format.
#' @inheritParams hetu
#' @return Date of birth as a vector in date format.
#' @examples
diff --git a/R/pin_sex.R b/R/pin_sex.R
index 5aa788b..d1513d3 100644
--- a/R/pin_sex.R
+++ b/R/pin_sex.R
@@ -1,5 +1,6 @@
-#' @title Sex From ID
-#' @description Extract sex from Finnish personal identification number.
+#' @title Extract Sex from Personal Identity Code
+#' @description Extract sex (as binary) from Finnish personal identification
+#' code.
#' @inheritParams hetu
#' @return Factor with label 'Male' and 'Female'.
#' @author Pyry Kantanen, Leo Lahti
diff --git a/R/rpin.R b/R/rpin.R
index 17dc9a8..442328d 100644
--- a/R/rpin.R
+++ b/R/rpin.R
@@ -1,7 +1,8 @@
-#' @title Generate a vector of random \code{hetu}
+#' @title Generate Random Personal Identity Codes
#'
#' @description
-#' A function that generates random \code{hetu}-pins.
+#' A function that generates random Finnish personal identity codes
+#' (\code{hetu} codes).
#'
#' @details
#' There is a finite number of valid personal identity codes available per day.
@@ -125,7 +126,7 @@ rpin <- function(n,
#' @export
rhetu <- rpin
-#' @title Generate a vector of random Finnish Business ID's (y-tunnus)
+#' @title Generate Random Finnish Business ID's (Y-tunnus)
#'
#' @description
#' A function that generates random Finnish Business ID's, \code{bid}-numbers
diff --git a/README.Rmd b/README.Rmd
index 1ce9ed4..cebc168 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -13,15 +13,15 @@ knitr::opts_chunk$set(
-[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
+[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](https://ropengov.org/)
[![R build status](https://github.com/rOpenGov/hetu/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/hetu/actions)
- [![codecov](https://codecov.io/gh/rOpenGov/hetu/branch/master/graph/badge.svg)](https://codecov.io/gh/rOpenGov/hetu)
+ [![codecov](https://codecov.io/gh/rOpenGov/hetu/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rOpenGov/hetu)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/hetu)](https://cran.r-project.org/package=hetu)
[![Downloads](http://cranlogs.r-pkg.org/badges/hetu)](https://cran.r-project.org/package=hetu)
[![Watch on GitHub][github-watch-badge]][github-watch]
[![Star on GitHub][github-star-badge]][github-star]
[![Follow](https://img.shields.io/twitter/follow/ropengov.svg?style=social)](https://twitter.com/intent/follow?screen_name=ropengov)
- [![cran version](http://www.r-pkg.org/badges/version/hetu)](http://cran.rstudio.com/web/packages/hetu)
+ [![cran version](http://www.r-pkg.org/badges/version/hetu)](https://CRAN.R-project.org/package=hetu)
@@ -30,9 +30,9 @@ knitr::opts_chunk$set(
### Introduction
-`hetu` is an R package for structural handling of national identification numbers used in Finland, or more specifically Finnish personal identity codes (in Finnish: henkilötunnus (hetu), in Swedish: personbeteckning). Some functions can also be used with Finnish Business ID numbers (y-tunnus).
+`hetu` is an R package for structural handling of identification codes used in Finland, most importantly Finnish flavour of national identification numbers, the Finnish personal identity codes (in Finnish: henkilötunnus (hetu), in Swedish: personbeteckning). Some functions can also be used with Finnish Business ID numbers (in Finnish: yritys- ja yhteisötunnus (y-tunnus), in Swedish: företags- och organisationsnummer (FO-nummer)) and Finnish Unique Identification Numbers (FINUID, in Finnish: sähköinen asiointitunnus (SATU), in Swedish: elektronisk kommunikationskod).
-The syntax in this package is unified with the similar package for Swedish ID numbers, the [sweidnumbr](https://github.com/rOpenGov/sweidnumbr).
+The syntax in this package aims to be, when convenient, similar with another package specializing in national identification numbers: the [sweidnumbr](https://github.com/rOpenGov/sweidnumbr) R package for working with Swedish personal identity numbers and corporation identity numbers.
### Installation
@@ -93,13 +93,13 @@ vignette("hetu")
* [Submit suggestions and bug reports](https://github.com/ropengov/hetu/issues) (provide the output of `sessionInfo()` and `packageVersion("hetu")` and preferably provide a [reproducible example](http://adv-r.had.co.nz/Reproducibility.html))
* [Send a pull request](https://github.com/rOpenGov/hetu/pulls)
* [Star us on the Github page](https://github.com/ropengov/hetu/)
- * [See our website](http://ropengov.org/community/) for additional contact information
+ * [See our website](https://ropengov.org/community/) for additional contact information
## Acknowledgements
-**Kindly cite this work** as follows: [Pyry Kantanen](http://github.com/pitkant/), Måns Magnusson, Jussi Paananen, Leo Lahti. hetu: Finnish personal ID number data toolkit for R. URL: [http://ropengov.github.io/hetu/](http://ropengov.github.io/hetu/)
+**Kindly cite this work** as follows: [Pyry Kantanen](https://github.com/pitkant/), Måns Magnusson, Jussi Paananen, Leo Lahti. hetu: Finnish personal ID number data toolkit for R. URL: [https://ropengov.github.io/hetu/](https://ropengov.github.io/hetu/)
-We are grateful to all [contributors](https://github.com/rOpenGov/hetu/graphs/contributors)! This project is part of [rOpenGov](http://ropengov.org).
+We are grateful to all [contributors](https://github.com/rOpenGov/hetu/graphs/contributors)! This project is part of [rOpenGov](https://ropengov.org).
[github-watch-badge]: https://img.shields.io/github/watchers/ropengov/hetu.svg?style=social
[github-watch]: https://github.com/ropengov/hetu/watchers
diff --git a/README.md b/README.md
index 84b93db..57230a4 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,11 @@
-
-[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
+[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](https://ropengov.org/)
[![R build
status](https://github.com/rOpenGov/hetu/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/hetu/actions)
-[![codecov](https://codecov.io/gh/rOpenGov/hetu/branch/master/graph/badge.svg)](https://codecov.io/gh/rOpenGov/hetu)
+[![codecov](https://codecov.io/gh/rOpenGov/hetu/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rOpenGov/hetu)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/hetu)](https://cran.r-project.org/package=hetu)
[![Downloads](http://cranlogs.r-pkg.org/badges/hetu)](https://cran.r-project.org/package=hetu)
[![Watch on
@@ -15,7 +14,7 @@ GitHub](https://img.shields.io/github/watchers/ropengov/hetu.svg?style=social)](
GitHub](https://img.shields.io/github/stars/ropengov/hetu.svg?style=social)](https://github.com/ropengov/hetu/stargazers)
[![Follow](https://img.shields.io/twitter/follow/ropengov.svg?style=social)](https://twitter.com/intent/follow?screen_name=ropengov)
[![cran
-version](http://www.r-pkg.org/badges/version/hetu)](http://cran.rstudio.com/web/packages/hetu)
+version](http://www.r-pkg.org/badges/version/hetu)](https://CRAN.R-project.org/package=hetu)
@@ -101,23 +100,23 @@ vignette("hetu")
## Contributing
- - [Submit suggestions and bug
+- [Submit suggestions and bug
reports](https://github.com/ropengov/hetu/issues) (provide the
output of `sessionInfo()` and `packageVersion("hetu")` and
preferably provide a [reproducible
example](http://adv-r.had.co.nz/Reproducibility.html))
- - [Send a pull request](https://github.com/rOpenGov/hetu/pulls)
- - [Star us on the Github page](https://github.com/ropengov/hetu/)
- - [See our website](http://ropengov.org/community/) for additional
+- [Send a pull request](https://github.com/rOpenGov/hetu/pulls)
+- [Star us on the Github page](https://github.com/ropengov/hetu/)
+- [See our website](https://ropengov.org/community/) for additional
contact information
## Acknowledgements
**Kindly cite this work** as follows: [Pyry
-Kantanen](http://github.com/pitkant/), Måns Magnusson, Jussi Paananen,
+Kantanen](https://github.com/pitkant/), Måns Magnusson, Jussi Paananen,
Leo Lahti. hetu: Finnish personal ID number data toolkit for R. URL:
-
+
We are grateful to all
-[contributors](https://github.com/rOpenGov/hetu/graphs/contributors)\!
-This project is part of [rOpenGov](http://ropengov.org).
+[contributors](https://github.com/rOpenGov/hetu/graphs/contributors)!
+This project is part of [rOpenGov](https://ropengov.org).
diff --git a/cran-comments.md b/cran-comments.md
index 2635b3b..5fa190e 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -1,17 +1,12 @@
## Test environments
-* local macOS 10.15.7 install, R 4.0.3
-* ubuntu 20.04, R 4.0.0
+
+* local macOS 12.4 install (Intel 64-bit), R 4.2.0
* win-builder (devel and release)
+* R-CMD-check workflow (macOS-latest, windows-latest, ubuntu-latest-devel, ubuntu-latest-release, ubuntu-latest-oldrel-1)
## R CMD check results
-There were no ERRORs or WARNINGs.
-
-There was 1 NOTE:
-* checking CRAN incoming feasibility ... NOTE
-Maintainer: ‘Pyry Kantanen ’
-
-New submission
+There were no ERRORs or WARNINGs.
## Downstream dependencies
diff --git a/man/bid_ctrl.Rd b/man/bid_ctrl.Rd
index d892b24..efe9d44 100644
--- a/man/bid_ctrl.Rd
+++ b/man/bid_ctrl.Rd
@@ -2,7 +2,7 @@
% Please edit documentation in R/pin_ctrl.R
\name{bid_ctrl}
\alias{bid_ctrl}
-\title{Check Finnish Business ID (y-tunnus) validity}
+\title{Check Validity of Finnish Business ID (Y-tunnus)}
\usage{
bid_ctrl(bid)
}
diff --git a/man/hetu.Rd b/man/hetu.Rd
index 3a6f10b..4e8497c 100644
--- a/man/hetu.Rd
+++ b/man/hetu.Rd
@@ -2,13 +2,12 @@
% Please edit documentation in R/hetu.R
\name{hetu}
\alias{hetu}
-\title{Finnish personal identification number extraction}
+\title{Generic Extraction Tool for Finnish Personal Identity Codes}
\usage{
hetu(pin, extract = NULL, allow.temp = FALSE, diagnostic = FALSE)
}
\arguments{
-\item{pin}{Finnish personal identification number as a character vector,
-or vector of identification numbers as a character vectors}
+\item{pin}{Finnish personal identity code(s) as a character vector}
\item{extract}{Extract only selected part of the information.
Valid values are "\code{hetu}", "\code{sex}", "\code{p.num}",
@@ -27,29 +26,29 @@ PINs. The checks are "\code{valid.p.num}", "\code{valid.ctrl.char}",
Default is \code{FALSE} which returns no diagnostic information.}
}
\value{
-Finnish personal identification number data.frame,
+Finnish personal identity code data.frame,
or if extract parameter is set, the requested part of the
information as a vector. Returns an error or \code{NA} if the given
- character vector is not a valid Finnish personal identification number.
-\item{hetu}{Finnish personal identification number as a character vector.
+ character vector is not a valid Finnish personal identity code.
+\item{hetu}{Finnish personal identity code as a character vector.
A correct pin should be in the form DDMMYYCZZZQ, where DDMMYY stands for
date, C for century sign, ZZZ for personal number and Q for control
character.}
\item{sex}{sex of the person as a character vector ("Male" or "Female").}
-\item{p.num}{Personal number part of the identification number.}
-\item{ctrl.char}{Control character for the personal identification number.}
+\item{p.num}{Personal number part of the identity code.}
+\item{ctrl.char}{Control character for the personal identity code.}
\item{date}{Birthdate.}
\item{day}{Day of the birthdate.}
\item{month}{Month of the birthdate.}
\item{year}{Year of the birthdate.}
\item{century}{Century character of the birthdate: + (1800), - (1900) or
A (2000).}
-\item{valid.pin}{Does the personal identification number pass all validity
+\item{valid.pin}{Does the personal identity code pass all validity
checks: (\code{TRUE} or \code{FALSE})}
}
\description{
-Extract information from Finnish personal identification
- numbers (hetu).
+Extract embedded information from Finnish personal identity
+ codes (hetu).
}
\examples{
hetu("111111-111C")
@@ -65,7 +64,7 @@ hetu(c("010101-0101", "111111-111C"), extract="sex")
}
\seealso{
\code{\link{pin_ctrl}} For validating Finnish personal
- identification numbers.
+ identity codes.
}
\author{
Pyry Kantanen, Jussi Paananen
diff --git a/man/hetu_control_char.Rd b/man/hetu_control_char.Rd
index 87e8ea8..48bdb23 100644
--- a/man/hetu_control_char.Rd
+++ b/man/hetu_control_char.Rd
@@ -2,7 +2,7 @@
% Please edit documentation in R/hetu_control_char.R
\name{hetu_control_char}
\alias{hetu_control_char}
-\title{Finnish Personal Identification Number Control Character Calculator}
+\title{Calculate Control Character for Personal Identity Code}
\usage{
hetu_control_char(pin, with.century = TRUE)
}
@@ -19,7 +19,7 @@ Control character, either a number 0-9 or a letter.
}
\description{
Calculate a valid control character for an incomplete
- Finnish personal identification numbers (hetu).
+ Finnish personal identity codes (hetu).
}
\details{
This method of calculating the control character was devised by
@@ -39,7 +39,7 @@ hetu_control_char("010101010", with.century = FALSE)
}
\seealso{
\code{\link{hetu}} For extracting information from Finnish personal
- identification numbers.
+ identity codes.
}
\author{
Pyry Kantanen
diff --git a/man/hetu_diagnostic.Rd b/man/hetu_diagnostic.Rd
index 426a15e..23d749c 100644
--- a/man/hetu_diagnostic.Rd
+++ b/man/hetu_diagnostic.Rd
@@ -3,7 +3,7 @@
\name{hetu_diagnostic}
\alias{hetu_diagnostic}
\alias{pin_diagnostic}
-\title{Diagnostics Tool for HETU}
+\title{Diagnostics Tool for Personal Identity Codes}
\usage{
hetu_diagnostic(pin, extract = NULL)
@@ -23,7 +23,8 @@ Valid values are "\code{hetu}", "\code{is.temp}", "\code{valid.p.num}",
A data.frame containing diagnostic checks about PINs.
}
\description{
-Produce a data frame of PINs that may require closer scrutiny.
+Prints information on the tests that are used
+ to confirm or reject the validity of each personal identity code.
}
\examples{
diagnosis_example <- c("010101-0102", "111111-111Q",
@@ -33,10 +34,13 @@ diagnosis_example <- c("010101-0102", "111111-111Q",
hetu_diagnostic(diagnosis_example)
# Extract century-related checks
hetu_diagnostic(diagnosis_example, extract = "valid.century")
-
diagnosis_example <- c("010101-0102", "111111-111Q",
"010101B0101", "320101-0101", "011301-0101",
"010101-01010", "010101-0011")
## Print all diagnoses
pin_diagnostic(diagnosis_example)
}
+\seealso{
+\code{\link{hetu}} for the main function on which
+ \code{hetu_diagnostic} relies on.
+}
diff --git a/man/pin_age.Rd b/man/pin_age.Rd
index 668c49a..7e793f0 100644
--- a/man/pin_age.Rd
+++ b/man/pin_age.Rd
@@ -3,15 +3,14 @@
\name{pin_age}
\alias{pin_age}
\alias{hetu_age}
-\title{Age from ID}
+\title{Extract Age from Personal Identity Code}
\usage{
pin_age(pin, date = Sys.Date(), timespan = "years", allow.temp = FALSE)
hetu_age(pin, date = Sys.Date(), timespan = "years", allow.temp = FALSE)
}
\arguments{
-\item{pin}{Finnish personal identification number as a character vector,
-or vector of identification numbers as a character vectors}
+\item{pin}{Finnish personal identity code(s) as a character vector}
\item{date}{Date at which age is calculated. If a vector is provided it
must be of the same length as the \code{pin} argument.}
@@ -32,7 +31,8 @@ use (personal numbers 002-899) are allowed.}
Age as an integer vector.
}
\description{
-Calculate the age in full years for a given date.
+Calculate age in years, months, weeks or days from
+ personal identity codes.
}
\examples{
ex_pin <- c("010101-0101", "111111-111C")
diff --git a/man/pin_ctrl.Rd b/man/pin_ctrl.Rd
index 6944584..627e08c 100644
--- a/man/pin_ctrl.Rd
+++ b/man/pin_ctrl.Rd
@@ -3,15 +3,14 @@
\name{pin_ctrl}
\alias{pin_ctrl}
\alias{hetu_ctrl}
-\title{Finnish Personal Identification Number Validator}
+\title{Check Validity of Personal Identity Code}
\usage{
pin_ctrl(pin, allow.temp = FALSE)
hetu_ctrl(pin, allow.temp = FALSE)
}
\arguments{
-\item{pin}{Finnish personal identification number as a character vector, or
-vector of identification numbers as a character vectors.}
+\item{pin}{Finnish personal identity code(s) as a character vector}
\item{allow.temp}{If TRUE, temporary PINs (personal numbers 900-999) are
handled similarly to regular PINs (personal numbers 002-899), meaning
@@ -23,7 +22,7 @@ A logical vector indicating whether the input vector contains valid
Finnish personal identity codes.
}
\description{
-Validate Finnish personal identification numbers (hetu).
+Validate Finnish personal identity codes (hetu).
}
\examples{
pin_ctrl("010101-0101") # TRUE
@@ -35,7 +34,7 @@ hetu_ctrl(c("010101-0101", "010101-010A")) # TRUE FALSE
}
\seealso{
\code{\link{hetu}} For extracting information from Finnish personal
- identification numbers.
+ identity codes.
}
\author{
Pyry Kantanen
diff --git a/man/pin_date.Rd b/man/pin_date.Rd
index 8d6f470..34a4a80 100644
--- a/man/pin_date.Rd
+++ b/man/pin_date.Rd
@@ -3,15 +3,14 @@
\name{pin_date}
\alias{pin_date}
\alias{hetu_date}
-\title{Get Birth date from PIN}
+\title{Extract Date of Birth from Personal Identity Code}
\usage{
pin_date(pin, allow.temp = FALSE)
hetu_date(pin, allow.temp = FALSE)
}
\arguments{
-\item{pin}{Finnish personal identification number as a character vector,
-or vector of identification numbers as a character vectors}
+\item{pin}{Finnish personal identity code(s) as a character vector}
\item{allow.temp}{Allow artificial or temporary PINs (personal numbers
900-999). If \code{FALSE} (default), only PINs intended for official
@@ -21,7 +20,7 @@ use (personal numbers 002-899) are allowed.}
Date of birth as a vector in date format.
}
\description{
-Calculates the date of birth in date format.
+Returns the date of birth in date format.
}
\examples{
pin_date(c("010101-0101", "111111-111C"))
diff --git a/man/pin_sex.Rd b/man/pin_sex.Rd
index 009142c..c02f536 100644
--- a/man/pin_sex.Rd
+++ b/man/pin_sex.Rd
@@ -3,15 +3,14 @@
\name{pin_sex}
\alias{pin_sex}
\alias{hetu_sex}
-\title{Sex From ID}
+\title{Extract Sex from Personal Identity Code}
\usage{
pin_sex(pin, allow.temp = TRUE)
hetu_sex(pin, allow.temp = TRUE)
}
\arguments{
-\item{pin}{Finnish personal identification number as a character vector,
-or vector of identification numbers as a character vectors}
+\item{pin}{Finnish personal identity code(s) as a character vector}
\item{allow.temp}{Allow artificial or temporary PINs (personal numbers
900-999). If \code{FALSE} (default), only PINs intended for official
@@ -21,7 +20,8 @@ use (personal numbers 002-899) are allowed.}
Factor with label 'Male' and 'Female'.
}
\description{
-Extract sex from Finnish personal identification number.
+Extract sex (as binary) from Finnish personal identification
+ code.
}
\examples{
pin_sex("010101-010A")
diff --git a/man/rbid.Rd b/man/rbid.Rd
index 9beb8d3..0c9d3ef 100644
--- a/man/rbid.Rd
+++ b/man/rbid.Rd
@@ -2,7 +2,7 @@
% Please edit documentation in R/rpin.R
\name{rbid}
\alias{rbid}
-\title{Generate a vector of random Finnish Business ID's (y-tunnus)}
+\title{Generate Random Finnish Business ID's (Y-tunnus)}
\usage{
rbid(n)
}
diff --git a/man/rpin.Rd b/man/rpin.Rd
index 65e74c2..8f9903f 100644
--- a/man/rpin.Rd
+++ b/man/rpin.Rd
@@ -3,7 +3,7 @@
\name{rpin}
\alias{rpin}
\alias{rhetu}
-\title{Generate a vector of random \code{hetu}}
+\title{Generate Random Personal Identity Codes}
\usage{
rpin(
n,
@@ -46,7 +46,8 @@ Default is 1.}
a vector of generated \code{hetu}-pins.
}
\description{
-A function that generates random \code{hetu}-pins.
+A function that generates random Finnish personal identity codes
+ (\code{hetu} codes).
}
\details{
There is a finite number of valid personal identity codes available per day.
diff --git a/man/satu_ctrl.Rd b/man/satu_ctrl.Rd
index e80e845..83fe118 100644
--- a/man/satu_ctrl.Rd
+++ b/man/satu_ctrl.Rd
@@ -2,7 +2,7 @@
% Please edit documentation in R/pin_ctrl.R
\name{satu_ctrl}
\alias{satu_ctrl}
-\title{Check Finnish Unique Identification Number validity}
+\title{Check Validity of Finnish Unique Identification Number (SATU)}
\usage{
satu_ctrl(satu)
}