Skip to content

Commit 5cf665b

Browse files
author
hornik
committed
Improvements for concordances.
git-svn-id: https://svn.r-project.org/R/trunk@88958 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent e7cf9bd commit 5cf665b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/library/tools/R/Rconcordance.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ matchConcordance <- function(linenum, concordance) {
130130
## 3. Optionally, the starting line number of the output coded as "ofs nn",
131131
## where nn is the offset to the first output line. This is omitted if nn is 0.
132132
## 4. The input line numbers corresponding to each output line.
133-
## This are compressed using the following simple scheme:
133+
## These are compressed using the following simple scheme:
134134
## The first line number, followed by
135135
## a run-length encoded diff of the rest of the line numbers.
136136

src/library/tools/man/matchConcordance.Rd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ Concordance strings are produced by the \code{"Rconcordance"} method of
113113
they are simply character vectors encoding the concordance data.
114114
The default method of the \code{as.concordance} generic function
115115
converts them to \code{"Rconcordance"} objects.
116+
117+
Concordance strings have three or four parts, separated by colons:
118+
\enumerate{
119+
\item The target filename.
120+
\item The source filename.
121+
\item Optionally, the starting line number of the target coded as
122+
\code{ofs \var{nn}} where \var{nn} is the offset to the first target
123+
line. This is omitted if \var{nn} is 0.
124+
\item The source line numbers corresponding to each target line.
125+
These are compressed using the following simple scheme: the first line
126+
number, followed by a run-length encoded diff of the rest of the line
127+
numbers.
128+
}
116129
}
117130
\value{
118131
\code{matchConcordance} returns a character array with one row

0 commit comments

Comments
 (0)