Learn R Programming

akmedoids (version 0.1.1)

wSpaces: Whitespaces removal

Description

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

Usage

wSpaces(traj)

Arguments

traj

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

Value

A matrix with all whitespaces (if any) removed.

Details

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

References

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

Examples

Run this code
# NOT RUN {
traj <- traj
wSpaces(traj)
# }

Run the code above in your browser using DataLab