c# pdf viewer wpf : How to rearrange pdf pages reader application software tool html winforms web page online v19i080-part458

JSS
Journal of Statistical Software
June2007,Volume19,Issue8.
http://www.jstatsoft.org/
SASweave: Literate Programming Using SAS
RussellV.Lenth
TheUniversityofIowa
SørenHøjsgaard
AarhusUniversity
Abstract
SASweave isacollectionofscriptsthatallowone toembedSAScode into o aL
A
T
E
X
document,andautomaticallyincorporatetheresultsaswell.SASweaveispatternedafter
Sweave,whichdoesthesamethingforcodewritteninR.Infact,adocumentmaycontain
bothSASandRcode. Besides s the convenienceofbeingabletoeasilyincorporateSAS
examples in n a document, SASweave facilitates the e concept t of“literate e programming”:
havingcode,documentation, andresults s packagedtogether. Amongother r things,this
helpstoensurethattheSASoutputinthedocumentisinconcordancewiththecode.
Keywords:SAS,SASweave,R,Sweave,literateprogramming.
1. Introduction
SASweaveisacollectionof AWKandshellscriptsthatprovideasimilarcapabilityforSAS
(SASInstituteInc.2003)thatSweave(Leisch2002)doesforR(RDevelopmentCoreTeam
2006). That t is,SASweave providestheability toembedSAScodeintoaL
A
T
E
Xdocument.
By processing g the e document with h SASweave’s sasweave script, the code e is s executed and
theresultsareincludedinthedocument. Thisprovidesa“literateprogramming”capability
(Knuth1992)forSAS,wherebycode,output(includinggraphics),anddocumentationareall
kepttogether,andwheretheseelementsareguaranteedtobesynchronized.
ForreadersunfamiliarwithliterateprogrammingandSweave,Figure1showsjusthoweasy
thisis (assumingprior familiaritywithLAT
E
X). Thefigure e displays aSASweave sourcefile
nameddemo.SAStex. Thefile e is for allpracticalpurposes a LAT
E
Xsource file; however,it
includestwoSAScodeenvironmentsthateachcontainSASstatements;thesearecalled“code
chunks.” (Theportions s thatare not codechunksare called“textchunks.”) Thefirstcode
chunkproducesprintedoutput,andthesecondoneproducesagraph. The\SASweaveOpts
macrointhepreamble,aswellasthesecondSAScodeenvironment,specifyoptionsforhow
toformattheresults. (The e datasetusedinthis example isoneof the standarddatasets
How to rearrange pdf pages reader - re-order PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Customizing Page Order of PDF Document in C# Project
rearrange pdf pages online; rearrange pages in pdf file
How to rearrange pdf pages reader - VB.NET PDF Page Move Library: re-order PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Sort PDF Document Pages Using VB.NET Demo Code
how to reverse pages in pdf; how to move pages in pdf acrobat
2
SASweave:LiterateProgrammingUsingSAS
\documentclass{article}
\usepackage{mathpazo}
\title{SASweave Demo}
\author{Russ Lenth}
\SASweaveOpts{outputsize=\footnotesize}
\begin{document}
\maketitle
This illustrates how to use \verb"SASweave" to integrate SAS code and output
in a \LaTeX{} document.
\begin{SAScode}
%%% Code chunk 1
proc univariate data = sashelp.shoes;
var sales;
ods select moments;
\end{SAScode}
We can also easily include e graphics\ldots
\begin{SAScode}{fig=TRUE} %%% % Code chunk 2
proc gplot data=sashelp.shoes;
plot returns * sales;
\end{SAScode}
\end{document}
Figure1:SimpleSASweavesourcefile,demo.SAStex.
providedinthesashelplibrary;soitshouldruncorrectlyas-isonanySASinstallation.)
WhenweruntheSASweave scriptsasweaveondemo.SAStexinFigure1,itrunstheSAS
code,gathers theoutput,integrates it intoa .tex file withtheother LAT
E
Xmarkup,runs
pdflatex,andproducesthedocumentdemo.pdf displayed(withmargins cropped) inFig-
ure2. NotethattheSAScodeforeachchunkisdisplayed,followedbyitsoutputinadifferent
font.Thesecondcodechunkproducesnoprintedoutput,soweseeonlytheresultinggraph.
This example illustrates most t of f what is s needed to o use SASweave effectively. There e are,
however,a number of options (see Section2) that allow one to dothingslikeexclude the
listingofcodeortheoutput,changethewayitisdisplayed,orre-usechunksofcode.
SASweave(andSweave)actuallyprovidetwodifferentwaystoprocessasourcedocument.
TheSASweavescriptsasweaveperformsweaving,wherebythecode,output,anddocumen-
tationareallpackagedtogetherintoa.tex file. Thescriptsastangle e performs tangling,
whereby the SAScodeis simply extractedfromthesource document and d savedina .sas
file,therebycreatingaproductionversionofthecode. TheSweave e analogues ofthese are
implementedintheRfunctionsSweaveandStangle,includedinR’sutilspackage.
TheimplementationofSASweavedocumentedhereisinspiredbyanearlierversionbyHøjs-
gaard(2006),which,likeSweave,waswritteninR.BoththeoldandthepresentSASweave
provideameansforincorporatingbothSASandRcodeinadocument. Thepresentversion
C# TIFF: How to Reorder, Rearrange & Sort TIFF Pages Using C# Code
C# TIFF - Sort TIFF File Pages Order in C#.NET. Reorder, Rearrange and Sort TIFF Document Pages in C#.NET Application. C# TIFF Page Sorting Overview.
how to rearrange pdf pages reader; how to move pages in pdf reader
VB.NET TIFF: Modify TIFF File by Adding, Deleting & Sort TIFF
you want to change or rearrange current TIFF &ltsummary> ''' Sort TIFF document pages in designed powerful & profession imaging controls, PDF document, image
move pages in pdf online; how to reorder pages in pdf preview
JournalofStatisticalSoftware
3
SASweaveDemo
RussLenth
May30,2007
ThisillustrateshowtouseSASweavetointegrateSAScodeandoutputina
L
A
T
E
Xdocument.
SAS> proc univariate data = = sashelp.shoes;
SAS>
var sales;
SAS>
ods select moments;
The UNIVARIATE E Procedure
Variable: Sales (Total l Sales)
Moments
N
395
Sum Weights
395
Mean
85700.1671
Sum Observations
33851566
Std Deviation
129107.234
Variance
1.66687E10
Skewness
3.94185882
Kurtosis
24.5888987
Uncorrected SS
9.46854E12
Corrected SS
6.56746E12
Coeff Variation
150.649921
Std Error Mean
6496.08993
Wecanalsoeasilyincludegraphics...
SAS> proc gplot t data=sashelp.shoes;
SAS>
plot returns s * * sales;
Total Returns
$0
$10,000
$20,000
$30,000
$40,000
$50,000
$60,000
Total Sales
$0
$500,000
$1,000,000 $1,500,000
VB.NET PDF File & Page Process Library SDK for vb.net, ASP.NET
page directly. Moreover, when you get a PDF document which is out of order, you need to rearrange the PDF document pages. In these
move pages in pdf document; how to reorder pages in pdf online
C# PowerPoint - How to Process PowerPoint
pages simply with a few lines of C# code. C# Codes to Sort Slides Order. If you want to use a very easy PPT slide dealing solution to sort and rearrange
pdf rearrange pages; reorder pdf pages online
markup,plusoneormoreSAScodeenvironments.TheSAScodeenvironmentscontain
Sstatementstobeexecutedandincorporatedinthedocument. Normally,thename
ourcefileshouldhavetheextension.SAStexratherthan.tex.Thesasweavescript
esthisfileandcreatesa.texfilewiththeSASoutputinserted.Optionally,sasweave
orunpdflatextoproduceaformatteddocument.
urcefilemaycontainoptionspecificationsthatcontrolhowcodechunksareprocessed.
ptionsaredetailedlaterinthissection.A\SASweaveOpts{}command,whichchanges
aults for allsubsequent codechunks,may appear(alone onaline)anywhereinthe
file. One-time e options s for a a given code chunk may y be e given in braces following a
{SAScode}statement. Forexample,tochangethepromptforallcode-chunklistings
ttheminabox,wecouldincludethisstatementinthesourcefile:
aveOpts{prompt=Example: , , codefmt = frame=single}
edacodechunkthatisexecutedbutcompletelyinvisibleinthedocument,wewould
VB.NET Word: How to Process MS Word in VB.NET Library in .NET
well programmed Word pages sorter to rearrange Word pages in extracting single or multiple Word pages at one & profession imaging controls, PDF document, image
reorder pages in pdf reader; move pages in pdf reader
Process Images in Web Image Viewer | Online Tutorials
used document types are supported, including PDF, multi-page easy to process image and file pages with the deleting a thumbnail, and you can rearrange the file
pdf change page order online; change pdf page order preview
avealsosupportssupportssourcefilesthatcontainRcode,withorwithoutSAScode.
botharepresent,itcanmatterwhethersasorRisrunfirst. Forthatreason,wehave
standardfilenameextensionsthatdeterminehowafileisprocessed;thoseextensions
ailedin Table 1. All l standard Sweave e extensions are supported; ; files s having those
onsarepasseddirectlytoSweave.Also,afilewitha.texextensionispassedstraight
atex. Thismakesitpossibletousethesamecommandtoprocessaverywidevariety
X-baseddocuments.
hesourcefilecontains bothSASandRcode,thetanglingprocess produces twoin-
entcodefiles. Ifthecodeisinterdependentsothatitisimportantthatoneofthose
esberunbeforetheother,itisuptotheprogrammertodocumentthatneed.
Optiondetails
sareenclosedinbracesattheendofa\begin{SAScode}or\SASweaveOptsstatement,
cifiedasalistofkeyword=valuepairs,separatedbycommas.Anywhitespaceinthe
listisignored,exceptinapromptoption(seebelow). Generally,optionswillappear
samelinewith\begin{SAScode}or\SASweaveOpts;buttoextendthemtoadditional
VB.NET PowerPoint: Sort and Reorder PowerPoint Slides by Using VB.
page will teach you to rearrange and readjust amount of robust PPT slides/pages editing methods and powerful & profession imaging controls, PDF document, image
how to move pages within a pdf document; how to change page order in pdf document
t (Type: Text Defaultvalue:(null))
hisoptionisusedspecifyhowthelistingofacodechunkisformatted.Codechunksare
utintoaverbatim-likeenvironmentnamedSASinputderivedfromtheLAT
ncyvrb(VanZandt 1998). Thevalue e of codefmt may beany of the customization
ommandsavailableforthatpackage. However,onemustseparatethecommandswith
micolonsinsteadofcommas. Also,rememberthatbracesareillegalwithinSASweave
ptions,soitmay benecessary towork aroundthemby definingmacros. Hereis s an
xample:
newcommand{\red}{\color{red}}
begin{SAScode}{codefmt += formatcom=\red;fontfamily=courier}
... SAS statements ...
end{SAScode}
he“+=”operator (available e only y here and d for outfmt) ) causes the given n commands
o be appended to o any y formats already in existence (specified in n a a \SASweaveOpts
ne). Using“=”instead d would replace e any existing codefmt. (The e fancyvrb com-
ode must produce e at least the e number of f graphs s specified, or r an error will occur.
Moreover, use e of f fig requires s graphics s to o be e generated d by SAS/GRAPH; the newer
xperimentalODSgraphicscapabilitiesarenotsupported.
mainingoptionsinthissectionhaveaneffectonlyiffigisnotFALSE.
(Type:number Defaultvalue: : .6)
his specifies the actual l width of the included graph, as a multiple of \linewidth,
milartowhatisdoneusing\setkeys{Gin}inSweave. (Thisiscompletelydifferent
omthewidthoptioninSweave.)
(Type:number Defaultvalue: : 4.0)
(Type:number Defaultvalue: : 4.0)
heseoptionsspecifythehsizeandvsizevaluesinthegoptionsstatementgenerated
ySASweave. Theysetthewidthandheight,ininches,oftheplotinthe.pdfoutput
e.Itdoesnotaffectthedisplayedwidthofthegraphinthedocument(usethewidth
ptiontochangethat). Changinghsizeand/orvsizewillaffecttheshapeoftheplot
ndtheapparentfontsizeoflabelsandsymbols.
Optionsforfilehandling
(Type:boolean
Defaultvalue:FALSE)
FALSE,theresultsofweavingthecodechunksareallincorporatedinthemain.tex
e;ifTRUE,theseresultsarewrittentoseparate.texfilesandread-intothemainfile
ithan\inputstatement.
.string (Type:string
Defaultvalue:basefilename)
hissetsthebeginningsofthenamesofallgraphicsfiles,aswellasofthe.texfilesgen-
atedifsplitisTRUE.Itmayincludeadirectorypath,delimitedbyslashes.Ahyphen,
code-chunk label,andtheappropriate extensionareappendedtothe prefix string.
orexample,supposethatprefix.stringissettochunks/myprefix.Ifcodechunk#3
roducesgraphics,theassociatedgraphicsfileisnamedchunks/myprefix-swv-003.pdf
Argumentsubstitution
ssibletodefinereusablechunksof SAScodethat acceptargumentstobeprovided
a\SAScoderef statement. This s isdoneinmuchthe samewaysasaL
on:setupacodechunkthatcontainsthesymbols#1,#2,etc. asplaceholders.First,
hischunkalabel,anduseoptionsofeval=FALSEand(probably)echo=FALSE.Then
ratethischunkinlatercodechunksusing
deref{label}{arg1}{arg2} ···
samewith\SAScoderef*),wherelabel isthelabelofthepreviouslydefinedcode
Thecontents of arg1 will l be substitutedforany y appearances of#1,arg2 willbe
utedforanyappearancesof#2,andsoforth.NocarefulcheckingisdonebySASweave;
manyargumentsareprovided,they’lljusthavenoeffect,andiftherearetoofew,the
assedtosaswillcontain“#”characters,likelyproducinganerror.
3. RunningSASweave
eneededonlyifthesourcefilecontains Sweavemarkupandonewantstomanually
unSweave. If f this optionis used, thesourcefile should havea .SAStex extension;
therwise,sasweavewillrunSweaveonitsown.
enamethe.texfiletoanextensionof.Rtexandstop.Seealsothe-noption.
4. Examples
amplesinthissectionillustratehowtousesomeofSASweave’scapabilities.
asicuse ofSASweave
ampleinSection1illustratesthemostbasicuseofSASweavewhennooptions(other
ntsize)arespecified. ThefirstcodechunkinFigure1isasimpleSASprogramthat
esonlylistingoutput.
ondcodechunkshowsthesimplestwaytoincorporateafigure.Thedefaultshapeof
Documents you may be interested
Documents you may be interested