The namaku purpose is to generate the acronym and sequence number for long name. This package will prevent the users from error when generating the acronym and sequence number.

This package is the part of Dhihram Tenrisau, MSc Health Data Science summer project, ‘Phylodynamic of Norovirus in UK 2003-2023’. The project is supervised by Stéphane Hué

Installation

You can install the development version of namaKU from GitHub with:

# install.packages("devtools")
devtools::install_github("Dhihram/namaKU")

Example

This package needs the additional package rlang, tidyverse, and dplyr

library(dplyr)
library(rlang)
library(tidyverse)
library(namaKU)

Data

This package need a data frame that contains the long name. The data frame should have a column that contains the long name. The data frame should not have NA values in the location column.

# Assuming 'df' is your data frame and it has a column 'AreaName'
d <- data.frame(id = seq(1:3), AreaName = c("loNDON", "Port Alegre", 'MakaSSar'), sub = c('a', 'b', 'c'))

#Check the data
str(d)
## 'data.frame':    3 obs. of  3 variables:
##  $ id      : int  1 2 3
##  $ AreaName: chr  "loNDON" "Port Alegre" "MakaSSar"
##  $ sub     : chr  "a" "b" "c"
#View the data
knitr::kable(d)
id AreaName sub
1 loNDON a
2 Port Alegre b
3 MakaSSar c

Package Utilization

The parameter of this package consist of :

  • df: data frame that contains the long name

  • location: the name of column that contain long name

  • vocal: TRUE to keep vocal letter, FALSE to remove vocal letter

  • number number of letter to keep from each word

  • seq: TRUE to add sequence number, FALSE to not add sequence number.

d <- namaKU(df = d, location = AreaName, vocal = FALSE, number = 3, seq = TRUE)
knitr::kable(d)
id AreaName sub acronym
1 loNDON a LND-1
2 Port Alegre b PRTLGR-1
3 MakaSSar c MKS-1