Running examples in ‘vtable-Ex.R’ failed
The error most likely occurred in:

> ### Name: vtable
> ### Title: Variable Table Function
> ### Aliases: vtable vt
> 
> ### ** Examples
> 
> ## Don't show: 
> #These tests use the out='htmlreturn' option
> #so that the same process of generating HTML is followed
> #but a browser window is not opened during testing.
> #This process is identical to regular operation except that
> #HTML is written to the R output rather than a browser.
> df <- data.frame(var1 = 1:4,var2=5:8,var3=c('A','B','C','D'),
+     var4=as.factor(c('A','B','C','C')),var5=c(TRUE,TRUE,FALSE,FALSE))
> 
> #Demonstrating different options:
> vtable(df,labels=c('Number 1','Number 2','Some Letters',
+     'Some Labels','You Good?'),
+     out='htmlreturn')

                    <html style="font-family:Helvetica,Arial,Sans">
                    <head><title>df</title><style type = "text/css">
                    p {
                    font-size:smaller;
                    }
                    table {
                    border: 0px;
                    border-collapse:collapse;
                    font-size:smaller;
                    table-layout:fixed;
                    margin-left:0%;
                    margin-right:auto;
                    }
                    .headtab {
                    width: 100%;
                    margin-left:auto;
                    margin-right:auto;
                    }
                    th {
                    background-color: #FFFFFF;
                    font-weight:bold;
                    text-align:left;
                    }
                    table tr:nth-child(odd) td {
                    background-color: #FFFFFF;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }
                    table tr:nth-child(even) td {
                    background-color: #D3D3D3;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }</style></head><body> <table class="headtab"> <tr><td style="text-align:left">vtable {vtable}</td> <td style="text-align:right">Variable Documentation</td></tr></table> <h1> df </h1><p>This data contains 4 rows and 5 columns.</p><h3>Variable Table</h3><table><tr><th style = "width:22%; text-align:left">Name</th><th style = "width:11%; text-align:left">Class</th><th style = "width:39%; text-align:left">Label</th><th style = "width:28%; text-align:left">Values</th></tr>
<tr><td style = "width:22%; text-align:left">var1</td><td style = "width:11%; text-align:left">integer</td><td style = "width:39%; text-align:left">Number 1</td><td style = "width:28%; text-align:left">Num: 1 to 4</td></tr>
<tr><td style = "width:22%; text-align:left">var2</td><td style = "width:11%; text-align:left">integer</td><td style = "width:39%; text-align:left">Number 2</td><td style = "width:28%; text-align:left">Num: 5 to 8</td></tr>
<tr><td style = "width:22%; text-align:left">var3</td><td style = "width:11%; text-align:left">character</td><td style = "width:39%; text-align:left">Some Letters</td><td style = "width:28%; text-align:left"></td></tr>
<tr><td style = "width:22%; text-align:left">var4</td><td style = "width:11%; text-align:left">factor</td><td style = "width:39%; text-align:left">Some Labels</td><td style = "width:28%; text-align:left">'A' 'B' 'C'</td></tr>
<tr><td style = "width:22%; text-align:left">var5</td><td style = "width:11%; text-align:left">logical</td><td style = "width:39%; text-align:left">You Good?</td><td style = "width:28%; text-align:left">TRUE FALSE</td></tr>
</table></body></html>> vtable(subset(df,select=c(1,2,5)),
+     labels=c('Number 1','Number 2','You Good?'),class=FALSE,values=FALSE,
+     out='htmlreturn')

                    <html style="font-family:Helvetica,Arial,Sans">
                    <head><title>subset(df, select = c(1, 2, 5))</title><style type = "text/css">
                    p {
                    font-size:smaller;
                    }
                    table {
                    border: 0px;
                    border-collapse:collapse;
                    font-size:smaller;
                    table-layout:fixed;
                    margin-left:0%;
                    margin-right:auto;
                    }
                    .headtab {
                    width: 100%;
                    margin-left:auto;
                    margin-right:auto;
                    }
                    th {
                    background-color: #FFFFFF;
                    font-weight:bold;
                    text-align:left;
                    }
                    table tr:nth-child(odd) td {
                    background-color: #FFFFFF;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }
                    table tr:nth-child(even) td {
                    background-color: #D3D3D3;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }</style></head><body> <table class="headtab"> <tr><td style="text-align:left">vtable {vtable}</td> <td style="text-align:right">Variable Documentation</td></tr></table> <h1> subset(df, select = c(1, 2, 5)) </h1><p>This data contains 4 rows and 3 columns.</p><h3>Variable Table</h3><table><tr><th style = "width:29%; text-align:left">Name</th><th style = "width:51%; text-align:left">Label</th></tr>
<tr><td style = "width:29%; text-align:left">var1</td><td style = "width:51%; text-align:left">Number 1</td></tr>
<tr><td style = "width:29%; text-align:left">var2</td><td style = "width:51%; text-align:left">Number 2</td></tr>
<tr><td style = "width:29%; text-align:left">var5</td><td style = "width:51%; text-align:left">You Good?</td></tr>
</table></body></html>> vtable(subset(df,select=c('var1','var4')),
+     labels=c('Number 1','Some Labels'),
+     factor.limit=1,col.width=c(10,10,40,35),
+     out='htmlreturn')

                    <html style="font-family:Helvetica,Arial,Sans">
                    <head><title>subset(df, select = c("var1", "var4"))</title><style type = "text/css">
                    p {
                    font-size:smaller;
                    }
                    table {
                    border: 0px;
                    border-collapse:collapse;
                    font-size:smaller;
                    table-layout:fixed;
                    margin-left:0%;
                    margin-right:auto;
                    }
                    .headtab {
                    width: 100%;
                    margin-left:auto;
                    margin-right:auto;
                    }
                    th {
                    background-color: #FFFFFF;
                    font-weight:bold;
                    text-align:left;
                    }
                    table tr:nth-child(odd) td {
                    background-color: #FFFFFF;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }
                    table tr:nth-child(even) td {
                    background-color: #D3D3D3;
                    padding:4px;
                    word-wrap: break-word;
                    word-break:break-all;
                    }</style></head><body> <table class="headtab"> <tr><td style="text-align:left">vtable {vtable}</td> <td style="text-align:right">Variable Documentation</td></tr></table> <h1> subset(df, select = c("var1", "var4")) </h1><p>This data contains 4 rows and 2 columns.</p><h3>Variable Table</h3><table><tr><th style = "width:10%; text-align:left">Name</th><th style = "width:10%; text-align:left">Class</th><th style = "width:40%; text-align:left">Label</th><th style = "width:35%; text-align:left">Values</th></tr>
<tr><td style = "width:10%; text-align:left">var1</td><td style = "width:10%; text-align:left">integer</td><td style = "width:40%; text-align:left">Number 1</td><td style = "width:35%; text-align:left">Num: 1 to 4</td></tr>
<tr><td style = "width:10%; text-align:left">var4</td><td style = "width:10%; text-align:left">factor</td><td style = "width:40%; text-align:left">Some Labels</td><td style = "width:35%; text-align:left">'A' and more</td></tr>
</table></body></html>> 
> #Different methods of applying variable labels:
> labelsmethod2 <- data.frame(var1='Number 1',var2='Number 2',
+     var3='Some Letters',var4='Some Labels',var5='You Good?')
> vtable(df,labels=labelsmethod2,out='htmlreturn')
Error in `$<-.data.frame`(`*tmp*`, "Label", value = list(var1 = "Number 1",  : 
  replacement has 1 row, data has 5
Calls: vtable -> $<- -> $<-.data.frame
Execution halted