cline: add clines to texblock

Description Usage Arguments Details Value Examples

View source: R/cline.R

Description

add clines to texblock object using a list object containing specifications.

Usage

1
cline(x, specs)

Arguments

x

texblock

specs

data.frame/list, object containing named elements c(line, i, j)

Details

line is the index to add the cline

i is the index to star the cline

j is the index to end the cline

if specs is a dataframe then it will be converted internally into a list using split on the specs$line element.

Value

texblock

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
x <- as.tb('$\\alpha$')
y <- as.tb('aaa')
z <- as.tb('bbb')

p <- x+y+z

l <- list(c(line=1,i=2,j=3),c(line=2,i=1,j=2),c(line=3,i=2,j=3))
d <- data.frame(line=1:3,i=c(2,1,2),j=c(3,2,3))

(p/p/p)%>%
cline(l)

(p/p/p)%>%
cline(d)

metrumresearchgroup/texblocks documentation built on July 18, 2020, 1:45 a.m.