gsk3 / taRifx

Development repo for the taRifx package of miscellaneous R functions
3 stars 1 forks source link

fix examples in latex.table.by #3

Open jangorecki opened 8 years ago

jangorecki commented 8 years ago

There is an attempt to load xtable namespace in examples latex.table.by.Rd#L27, code below is the results from examples. As xtable is suggested dependency, it should not be required to run examples according to R-exts. This can be conditionally escaped with requireNamespace. It is possible there are other cases of that issue in other examples, this one was to first that fails.

* checking examples ... ERROR
Running examples in ‘taRifx-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: latex.table.by
> ### Title: Exports a latex table with the first N columns being multirow
> ###   grouping variables.
> ### Aliases: latex.table.by
> 
> ### ** Examples
> 
> my.test.df <- data.frame(grp=rep(c("A","B"),each=10),data=runif(20))
> library(xtable)
Error in library(xtable) : there is no package called ‘xtable’
Execution halted
jangorecki commented 8 years ago

The same with gdata:

* checking examples ... ERROR
Running examples in ‘taRifx-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: searchPattern
> ### Title: Create a vector that starts with a given number and widens out
> ### Aliases: searchPattern
> 
> ### ** Examples
> 
> library(gdata)
Error in library(gdata) : there is no package called ‘gdata’
Execution halted