Learn R Programming

StandardizeText (version 1.0)

StandardizeText-package: Standardize Text

Description

Standardizes text according to a template; particularly useful for country names.

Arguments

Details

Package:
StandardizeText
Type:
Package
Version:
1.0
Date:
2013-3-4
License:
GPL-3
This package contains two main functions: standardize.text() standardizes generic text, and standardize.countrynames() is optimized for standardizing country names.

Examples

Run this code
library(StandardizeText)
sample.text <- c("blue car","STOP","email","tree")
sample.std <- c("the tree","car","e-mail","stop")
sample.df <- data.frame(foo=2:5,bar=sample.text, baz=7:4, qux=sample.std)
out.a <- standardize.text(sample.text,standard=sample.std,suggest="auto")
out.b <- standardize.text(sample.df,2,sample.df,"qux",suggest="auto")

Run the code above in your browser using DataLab