ftr: Footer

Description Usage Arguments Examples

Description

dprint is to be designed so that users can define custom functions to present footer on page. This is the out of box footer.

Usage

1
2
3
4
ftr(txt1, frmt1 = frmt(fontfamily = "", fontface = "plain", fontsize = 8, col
  = "black", linespace = 0.75), date = TRUE,
  pagelayout.obj = pagelayout(dtype = "portrait", margins = c(1, 0.5)),
  pgtxt2 = "page", pagenum = NULL)

Arguments

txt1

A vector of text to be placed on bottom right of footer

frmt1

style sheet data type frmt for text on bottom left

date

Boolean, should today's date be placed in bottom center of page

pagelayout.obj

Tells footer what type of page dprint is working with. Has separate margins to allow for extra space between table presentation

pgtxt2

Text to be appended to page number. To suppress numbering, make NULL

pagenum

Didn't want parameter here, I wanted pagenum to be passed down the calls stack "eval.parent(pagenum, 1)" here is the only way I could get to work ~ carlin

Examples

 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
longtable1 <- rdesc(15, 7)
longtable2 <- rdesc(7, 4)
h <- expression(hdr("Multiple Page Report",
                pagelayout.obj=pagelayout(dtype="landscape", margins=c(.75, .5))))
f <- expression(ftr("R Package tabulaR",
                pagelayout.obj=pagelayout(dtype="landscape", margins=c(.75, .5))
                , pagenum=eval.parent(pagenum, 1)
                ))
               
 pdf("longtable1.pdf", height=8.5, width=11)
    dp <- dprint(fmla= group+level~ `This is a Control`:(Mean1 + Variance1) +
    Treatment:(Mean2 + Variance2)+p.value,
          data=longtable1, showmargins=TRUE, dtype="landscape",
          newpage=TRUE, pagenum=1, margins=1,
          f.hdr=h, f.ftr=f
          )
   
   dprint(fmla= group+level~ `This is a Control`:(Mean1 + Variance1) + 
   Treatment:(Mean2 + Variance2)+p.value,
          data=longtable2, showmargins=TRUE, dtype="landscape",
          newpage=TRUE, lastcall=dp, # Pick up with page numbering
          margins=1,
          f.hdr=h, f.ftr=f
          )
  x <- rnorm(100)
  y <- rnorm(100)
  f2 <- expression(ftr("R Package tabulaR",
                pagelayout.obj=pagelayout(dtype="landscape", margins=c(.5, .5))
                , pagenum=dp$pagenum+1
                )) 
  # par(mai=c(2,3,2,3))
  plot(x,y, main="Scatter Plot X vs. Y")
  eval(f2)
  eval(h)
  par(mfcol=c(1,2), pty="s", bg="grey", mai=c(1,1,1,1))
  plot(density(x), "Distribution of X", xlab="x", bg="blue")
  plot(x,y, main="Scatter Plot X vs. Y")
  eval(f2)
  eval(h)
  dev.off()

dprint documentation built on May 2, 2019, 10:14 a.m.

Related to ftr in dprint...