remove_dots: Remove duplicated full stops

View source: R/utilities.R

remove_dotsR Documentation

Remove duplicated full stops

Description

A convenience function to remove any duplicated full stops (aka periods) from the elements of a vector, e.g. will change .. or ... or .... etc. to just . Mainly used to fix column names.

Usage

remove_dots(x)

Arguments

x

character or string. Contains duplicate full stops to be removed.

Value

Returns character or string with duplicate full stops removed.

Examples


df <- data.frame(
  column...name = c(1, 2, 3)
)

colnames(df) <- remove_dots(colnames(df))


CambridgeCentreForProteomics/camprotR documentation built on Jan. 27, 2023, 8:36 p.m.