3

I am trying to use papaja::printnum to print "zero". In the following code, printnum for as.integer(1) works, but printnum for as.integer(0) does not. Is this intended behaviour?

library(papaja) 
printnum(as.integer(1), numerals=F)
#> [1] "one"
printnum(as.integer(0), numerals=F)
#> [1] ""

Created on 2019-08-27 by the reprex package (v0.3.0)

Esther
  • 441
  • 2
  • 15
  • 1
    Thanks, great question. Currently, this is by design, but I understand that printing nothing may be suboptimal. Would you mind opening a GitHub issue, so we can discuss this further? – crsh Aug 28 '19 at 12:18
  • 1
    Done ! Here is the link: https://github.com/crsh/papaja/issues/311 – Esther Aug 28 '19 at 14:18

1 Answers1

2

Previously, printnum.integer() returned "" by design. After some discussion, I have added a new option zero_string that defaults to "no". The new behavior should address your question:

> papaja::printnum(as.integer(0), numerals=F)
[1] "no"
crsh
  • 1,699
  • 16
  • 33