Learn R Programming

fsthet (version 1.0.1)

remove.spaces: This removes spaces from a character vector

Description

This removes spaces from a before and after words in a character vector. It was adapted from a similar function in adegenet.

Usage

remove.spaces(charvec)

Arguments

charvec

is a vector of characters containing spaces to be removed.

Value

charvec

A vector of characters without spaces

References

http://adegenet.r-forge.r-project.org/

Examples

Run this code
# NOT RUN {
charvec<-c("this ", " is"," a"," test")
remove.spaces(charvec)
# }

Run the code above in your browser using DataLab