TysonStanley / furniture

The furniture R package contains table1 for publication-ready simple and stratified descriptive statistics, tableC for publication-ready correlation matrixes, and other tables #rstats
49 stars 7 forks source link

package example error: object 'tot_column' not found #21

Closed ericpgreen closed 4 years ago

ericpgreen commented 4 years ago

In preparing a separate bug report I got an error trying to use one of the package examples:

Error in cat(" & ", tot_column, "\multicolumn{", paste0(len), "}{c}{", : object 'tot_column' not found


---
title             : "The title"
shorttitle        : "Title"

author: 
  - name          : "First Author"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address       : "Postal address"
    email         : "my@email.com"
  - name          : "Ernst-August Doelle"
    affiliation   : "1,2"

affiliation:
  - id            : "1"
    institution   : "Wilhelm-Wundt-University"
  - id            : "2"
    institution   : "Konstanz Business School"

authornote: |
  Add complete departmental affiliations for each author here. Each new line herein must be indented, like this line.

  <!-- https://tinyurl.com/ybremelq -->

keywords          : "keywords"
wordcount         : "X"

bibliography      : ["r-references.bib"]

floatsintext      : no
figurelist        : no
tablelist         : no
footnotelist      : no
linenumbers       : yes
mask              : no
draft             : no

documentclass     : "apa6"
classoption       : "man"
output            : papaja::apa6_pdf
header-includes:
  - \raggedbottom
---

```{r setup, include = FALSE}
library("papaja")
library(tidyverse)
library(furniture)
x  <- runif(1000)
y  <- rnorm(1000)
z  <- factor(sample(c(0,1), 1000, replace=TRUE))
a  <- factor(sample(c(1,2), 1000, replace=TRUE))
df <- data.frame(x, y, z, a)

# Simple
table1(df, x, y, z, a,
        caption = "My furniture table.",
        output = "latex2")
TysonStanley commented 4 years ago

Thanks, I see where it is having an issue. This will be fixed in the next few minutes.

ericpgreen commented 4 years ago

Thanks!

On Dec 10, 2019, at 4:50 PM, Tyson Barrett notifications@github.com wrote:

 Thanks, I see where it is having an issue. This will be fixed in the next few minutes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.