# Hline: Add a horizontal line to a LaTeX table. In tables: Formula-Driven Table Generation

## Description

This function inserts a LaTeX directive to draw a full or partial line in a table.

## Usage

 1 Hline(columns, nearData = FALSE) 

## Arguments

 columns Which columns should receive the line? nearData See the Details section of Heading.

## Details

Hline() is not very flexible: it must be the leftmost header in a row specification for the table, i.e. mean * Hline() is not allowed. Anything to the right of the Hline() factor will be ignored.

## Value

Produces an expression to insert a label which will be interpreted by LaTeX as a request for a horizontal line.

## Examples

 1 latex( tabular( Species + Hline() + 1 ~ mean*Sepal.Width, data=iris) ) 

### Example output

Loading required package: Hmisc

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

format.pval, round.POSIXt, trunc.POSIXt, units

\begin{tabular}{lc}
\hline
& \multicolumn{1}{c}{mean} \\
Species  & \multicolumn{1}{c}{Sepal.Width} \\
\hline
setosa  & $3.428$ \\
versicolor  & $2.770$ \\
virginica  & $2.974$ \\
\hline %  &  \\
All  & $3.057$ \\
\hline
\end{tabular}


tables documentation built on Nov. 12, 2018, 1:04 a.m.