deleteRight {datana}R Documentation

Deletes the last n-characters of a string

Description

Function to delete the last n-characters of a string from the right-hand side.

Usage

deleteRight(fac, n)

Arguments

fac

is an object of class string or factor

n

is the number of characters to be deleted of a the string given in 'fac'.

Details

It is specially set to arrange data vector having alphanumeric format.

Value

This function returns an object having n-less characters from the right-hand side.

Author(s)

Christian Salas-Eljatib

References

Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro

Examples


last.names.id <- c("Stage-1924","Gregoire-1958","Robinson-1967")
deleteRight(last.names.id,5)
deleteRight(last.names.id,4)

[Package datana version 1.1.1 Index]