add clines to texblock object using a list object containing specifications.
cline(x, specs)
x | texblock |
---|---|
specs | data.frame/list, object containing named elements c(line, i, j) |
texblock
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.
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)#> $\alpha$&aaa&bbb\\ \cline{2-3} #> $\alpha$&aaa&bbb\\ \cline{1-2} #> $\alpha$&aaa&bbb\\ \cline{2-3}(p/p/p)%>% cline(d)#> $\alpha$&aaa&bbb\\ \cline{2-3} #> $\alpha$&aaa&bbb\\ \cline{1-2} #> $\alpha$&aaa&bbb\\ \cline{2-3}