[R] Writing non-graphic (text) output to PDF

Ed Heaton heatone at comcast.net
Fri Aug 19 19:14:31 CEST 2011


Hi, friends.

I keep coming to you because I'm so new to R and can't seem to figure out
some simple things.  Sorry.

Consider the following code.  I want to load a table and write out the
structure to a PDF document.  I just can't seem to manage writing
non-graphic output to PDF.  Any help?  I've tried several functions, but
nothing worked.  All I get is the title.

# **********************************************************************
# Load the DEBT table.
  debt <- readRDS("T:/R.Data/Debt.rData")
  dim(debt)
# Open the debt.pdf file for graphics output.
  pdf(
    file=paste(
      "R:/DAS/DMS/FedDebt"
     ,"DataDiscovery"
     ,"DistributionAnalysis"
     ,"Report"
     ,"Debt.pdf"
     ,sep="/"
    )
  )
# ======================================================================
# Write the debt structucture to the output PDF.
  plot.new()
  title("DEBT")
  str(debt)
# ======================================================================
  dev.off() # Turn off the PDF device.
# ************************** End of Program ****************************



Ed

Ed Heaton
Project Manager, Sr. SAS Developer
Data and Analytic Solutions, Inc.
10318 Yearling Drive
Rockville, MD 20850
Office: 301-520-7414
eheaton at dasconsultants.com
www.dasconsultants.com <http://www.dasconsultants.com/> 
CMMI ML-2, SBA 8(a) & SDB, WBE (WBENC), MBE (VA & MD)

ed at heaton.name

(Re: http://www.r-project.org/posting-guide.html)



More information about the R-help mailing list