Learn R Programming

LOGAN (version 1.0.1)

TrimVar: Trim variables

Description

TrimVar() is a function that allows you to remove whitespace inside the strings of a vector.

Usage

TrimVar(data, trim.vector)

Value

This function returns a vector removing trailing and leading spaces inside the original vector.

Arguments

data

dataset

trim.vector

vector of variables on the dataset to be trimmed

Examples

Run this code
head(m0$TrimVar(cp025q01, "event"))

Run the code above in your browser using DataLab