Learn R Programming

connect3 (version 0.1.0)

read.latex: A function for reading LaTeX files

Description

A function for reading LaTeX files

Usage

read.latex(file, filepath)

Arguments

file
is the name of a file with .tex extension. The .tex file must be generated by R Sweave using package 'knitr'.
filepath
is the absolute filepath where .tex file is located.

Value

read.latex returns two character strings: tex and path, both of which are used by write.rtf.

See Also

write.rtf

Examples

Run this code
#Read a sample LaTeX file
file<-'connect3-minimal.tex'
filepath<-paste(sub("examples/.*","\\1",
          system.file("examples","connect3-minimal.tex",package="connect3")),
          "examples", sep='')
obj<-read.latex(file, filepath)
obj$tex
obj$path

Run the code above in your browser using DataLab