Skip to content
Back to formatted view

Raw Message

Message-ID: <006601cc5e93$78010d00$68032700$@comcast.net>
Date: 2011-08-19T17:14:31Z
From: Ed Heaton
Subject: Writing non-graphic (text) output to PDF

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)