- using R version 2.9.1 (2009-06-26)
- using session charset: ASCII
- checking for file 'kappalab/DESCRIPTION' ... OK
- this is package 'kappalab' version '0.4-4'
- package encoding: latin1
- checking package name space information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking for executable files ... OK
- checking whether package 'kappalab' can be installed ... OK
- checking package directory ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking R files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the name space can be loaded with stated dependencies ... OK
- checking for unstated dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... OK
- checking Rd files ... OK
- checking Rd files against version 2 parser ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking for portable use of $BLAS_LIBS ... OK
- checking examples ... ERROR
Running examples in 'kappalab-Ex.R' failed.
The error most likely occurred in:
> ### * Mobius.set.func-class
>
> flush(stderr()); flush(stdout())
>
> ### Encoding: latin1
>
> ### Name: Mobius.set.func-class
> ### Title: Class "Mobius.set.func"
> ### Aliases: Mobius.set.func-class
> ### Keywords: classes
>
> ### ** Examples
>
> ## the Mobius transform of a set function directly
> a <- Mobius.set.func(1:16,4,4)
>
> ## the attributes of the object
> a@n
[1] 4
> a@k
[1] 4
> a@data
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
> a@subsets
[1] 0 1 2 4 8 3 5 9 6 10 12 7 11 13 14 15
>
> ## a set function
> mu <- set.func(7:-8)
> ## and its Mobius transform
> a <- Mobius(mu)
>
> ## some conversions that cannot work
> ## as.game(a)
> ## as.capacity(a)
> ## as.card.set.func(a)
>
> ## some tests
> is.cardinal(a)
[1] FALSE
> is.kadditive(a,2)
[1] FALSE
> is.monotone(a)
[1] FALSE
>
> ## some transformations
> zeta(a)
set.func
{} 7.000000
{1} 6.000000
{2} 5.000000
{3} 4.000000
{4} 3.000000
{1,2} 2.000000
{1,3} 1.000000
{1,4} 0.000000
{2,3} -1.000000
{2,4} -2.000000
{3,4} -3.000000
{1,2,3} -4.000000
{1,2,4} -5.000000
{1,3,4} -6.000000
{2,3,4} -7.000000
{1,2,3,4} -8.000000
> k.truncate.Mobius(a,2)
Mobius.set.func
{} 7.000000
{1} -1.000000
{2} -2.000000
{3} -3.000000
{4} -4.000000
{1,2} -2.000000
{1,3} -2.000000
{1,4} -2.000000
{2,3} -3.000000
{2,4} -3.000000
{3,4} -3.000000
>
> ## summary
> Shapley.value(a)
1 2 3 4
-2.000000 -3.333333 -4.333333 -5.333333
> interaction.indices(a)
1 2 3 4
1 NA 0 0 0
2 0 NA 0 0
3 0 0 NA 0
4 0 0 0 NA
> # the same
> summary(a)
Shapley value :
1 2 3 4
-2.000000 -3.333333 -4.333333 -5.333333
Shapley interaction indices :
1 2 3 4
1 NA 0 0 0
2 0 NA 0 0
3 0 0 NA 0
4 0 0 0 NA
>
> ## save the Mobius transform to a file
> d <- to.data.frame(a)
> write.table(d,"my.Mobius.set.func.csv",sep="\t")
>
> # finally, some conversions that should work
> mu <- set.func(c(0,1,1,1,2,2,2,3))
Error in set.func.internal(object) : wrong argument
Calls: set.func -> set.func.internal
Execution halted
- elapsed time (check, wall clock): 2:13