# PDF Version of Written Pieces

#### Irucka Embry

#### 2016-09-21

# View PDF version of each written piece

If you would like to view the PDFs, then use the code below that matches your operating system:

# Load the iemisctext package first

    library(iemisctext)

# under Unix-based operating systems

Source: Show me the pdf already | R-bloggers By Will

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "Connect_the_Dots.pdf", package = "iemisctext")
    system2(pdf, args = f)

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "The-War-Prayer.pdf", package = "iemisctext")
    system2(pdf, args = f)

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "War-Is-A-Racket.pdf", package = "iemisctext")
    system2(pdf, args = f)

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "The-Mask-of-Anarchy.pdf", package = "iemisctext")
    system2(pdf, args = f)

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "Untitled_Us-versus-Them-or-People-Screwing-over-Other-People.pdf", package = "iemisctext")
    system2(pdf, args = f)

    pdf <- getOption("pdfviewer", default = "")
    f <- system.file("texts", "pdf", "Untitled_Climate-Strange.pdf", package = "iemisctext")
    system2(pdf, args = f)

# under MS Windows operating systems

Source: Show me the pdf already | R-bloggers By Will

    f <- system.file("texts", "pdf", "Connect_the_Dots.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

    f <- system.file("texts", "pdf", "The-War-Prayer.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

    f <- system.file("texts", "pdf", "War-Is-A-Racket.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

    f <- system.file("texts", "pdf", "The-Mask-of-Anarchy.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

    f <- system.file("texts", "pdf", "Untitled_Us-versus-Them-or-People-Screwing-over-Other-People.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

    f <- system.file("texts", "pdf", "Untitled_Climate-Strange.pdf", package = "iemisctext")
    shell.exec(normalizePath(f))

# under OS X operating systems

Source: Opening PDF within R studio using file.show - Stack Overflow – rensa

    f <- system.file("texts", "pdf", "Connect_the_Dots.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

    f <- system.file("texts", "pdf", "The-War-Prayer.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

    f <- system.file("texts", "pdf", "War-Is-A-Racket.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

    f <- system.file("texts", "pdf", "The-Mask-of-Anarchy.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

    f <- system.file("texts", "pdf", "Untitled_Us-versus-Them-or-People-Screwing-over-Other-People.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

    f <- system.file("texts", "pdf", "Untitled_Climate-Strange.pdf", package = "iemisctext")
    system2("open", args = f, wait = FALSE)

[encoded data, 5332 characters]