w_spaces: Whitespaces removal

Description Usage Arguments Details Value References Examples

View source: R/w_spaces.R

Description

This function removes all the leading and the trailing whitespaces in data

Usage

1
w_spaces(traj, remove="Both", verbose=TRUE)

Arguments

traj

[matrix (numeric)]: longitudinal data. Each row represents an individual trajectory (of observations). The columns show the observations at consecutive time points.

remove

[character]: Type of whitespace to remove. That is, "Left" (leading), (2) "Right" (trailing), or "Both" (both leading and trailing whitespaces). Default: "Both".

verbose

to suppress output messages (to the console). Default: TRUE.

Details

Given a matrix suspected to contain whitespaces, this function removes the type of the whitespaces specified and returns a cleaned data. ’Whitespaces’ are white characters often introduced into data during data entry, for instance by wrongly pressing the spacebar. For example, neither " A" nor "A " is the same as "A" because of the whitespaces that exist in them. They can also result from systematic errors in data recording devices.

Value

A matrix with all whitespaces (if any) removed.

References

https://en.wikipedia.org/wiki/Whitespace_character

Examples

1
2
3

akmedoids documentation built on April 13, 2021, 9:07 a.m.