What is the meaning of this error "Error in if (any (B <1)) stop (" B is too small ")" when using the tabplot package

I found the tabplot package to render a large database. I ran it using the code below, but I get this error in different data frames:

 "Error in if (any(B < 1)) stop("B too small") : missing value where TRUE/FALSE needed In addition: Warning message: In bbatch(n, as.integer(BATCHBYTES/theobytes)) : NAs introduced by coercion" 

Here is an example:

 dat <- read.table(text = " birds wolfs snakes 3 9 7 3 8 4 1 2 8 1 2 3 1 8 3 6 1 2 6 7 1 6 1 5 5 9 7 3 8 7 4 2 7 1 2 3 7 6 3 6 1 1 6 3 9 6 1 1 ",header = TRUE) install.packages("tabplot") package 'ff' successfully unpacked and MD5 sums checked package 'bit' successfully unpacked and MD5 sums checked package 'fastmatch' successfully unpacked and MD5 sums checked package 'ffbase' successfully unpacked and MD5 sums checked package 'tabplot' successfully unpacked and MD5 sums checked library("tabplot", lib.loc="~/R/win-library/3.1") tab <- tableplot(dat, plot = FALSE) ## The tabplot command Error in if (any(B < 1)) stop("B too small") : missing value where TRUE/FALSE needed In addition: Warning message: In bbatch(n, as.integer(BATCHBYTES/theobytes)) : NAs introduced by coercion 

Any idea how to overcome this problem?

UPDATE I used a different computer and it works great. Both computers are on a 64-bit version of Windows, but on the computer that I got to work, it is Win7 pro and on the computer that has WIN SERVER 2013 OS error

+5
source share
2 answers

According to schuemie's comment, this error is related to the amount of memory needed for ffdfdlpy and can be fixed with help for each session

options(ffmaxbytes = min(getOption("ffmaxbytes"),.Machine$integer.max * 12))

let it work.

I can confirm that this works with sessionInfo() :

R version 3.2.4 (2016-03-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

+2
source

The problem is with the bbatch(n, as.integer(BATCHBYTES/theobytes)) . No matter what you do, you enter NA when integers are expected. And any(NA < 1) gives NA . This leads to the fact that the if() command cannot decide whether it is TRUE or FALSE :

 if ( NA ) stop("This is silly") # Error in if (NA) stop("This is silly") : # missing value where TRUE/FALSE needed 

My guess (and this is a complete hunch at this point without further testing) is to try to add stringsAsFactors=FALSE to your read.table() command.

+1
source

All Articles