File: first.word.Rd

package info (click to toggle)
hmisc 4.2-0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,332 kB
  • sloc: asm: 27,116; fortran: 606; ansic: 411; xml: 160; makefile: 2
file content (53 lines) | stat: -rw-r--r-- 1,286 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
\name{first.word}
\alias{first.word}
\title{First Word in a String or Expression}
\description{
\code{first.word} finds the first word in an expression.  A word is defined by
unlisting the elements of the expression found by the S parser and then
accepting any elements whose first character is either a letter or period.
The principal intended use is for the automatic generation of temporary
file names where it is important to exclude special characters from
the file name. For Microsoft Windows, periods in names are deleted and
only up to the first 8 characters of the word is returned.
}
\usage{
first.word(x, i=1, expr=substitute(x))
}
\arguments{
\item{x}{
any scalar character string
}
\item{i}{
word number, default value = 1.  Used when the second or \code{i}th word is
wanted.  Currently only the \code{i=1} case is implemented.
}
\item{expr}{
any S object of mode \code{expression}.
}
}
\value{
a character string
}
\author{
Frank E. Harrell, Jr.,
\cr
Department of Biostatistics,
\cr
Vanderbilt University,
\cr
\email{f.harrell@vanderbilt.edu}


Richard M. Heiberger,
\cr
Department of Statistics,
\cr
Temple University, Philadelphia, PA.
\cr
\email{rmh@astro.ocis.temple.edu}
}
\examples{
first.word(expr=expression(y ~ x + log(w)))
}
\keyword{character}
\keyword{manip}