Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

capstring

Converts initial character of a string to upper case


Description

This function is useful for use before plotting, if one wants capitalized axis labels or factor levels.

Usage

capstring(names)

Arguments

names

a character vector

Value

a character vector with upper case initial values

Author(s)

W.J. Braun

Examples

capstring(names(tinting)[c(3,4)])

library(lattice)
levels(tinting$agegp) <- capstring(levels(tinting$agegp))
xyplot(csoa ~ it | sex * agegp, data=tinting)

DAAG

Data Analysis and Graphics Data and Functions

v1.24
GPL-3
Authors
John H. Maindonald and W. John Braun
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.