* using log directory 'd:/Rcompile/CRANpkg/local/3.3/panelaggregation.Rcheck' * using R version 3.3.2 (2016-10-31) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'panelaggregation/DESCRIPTION' ... OK * this is package 'panelaggregation' version '0.1' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'panelaggregation' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over 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 package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking 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 ... NOTE computeShares: no visible global function definition for 'as.formula' computeWeightedMeans: no visible binding for global variable 'weighted.mean' doUniqueCJ : : no visible global function definition for 'na.omit' extractTimeSeries: no visible global function definition for 'ts' Undefined global functions or variables: as.formula na.omit ts weighted.mean Consider adding importFrom("stats", "as.formula", "na.omit", "ts", "weighted.mean") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... ERROR Running examples in 'panelaggregation-Ex.R' failed The error most likely occurred in: > ### Name: computeShares > ### Title: Compute Weighted Shares By Group > ### Aliases: computeShares > > ### ** Examples > > # TODO: add new weight columns to BTS demo > # load library and dataset > library(panelaggregation) > data(btsdemo) > head(btsdemo) uid year period weight question_1 question_2 question_3 question_4 1: 2 1997 3 1 2 2 2 1 2: 2 1997 1 1 1 2 3 1 3: 2 1995 4 1 2 1 3 1 4: 2 1998 4 1 3 2 3 3 5: 2 2001 3 1 1 3 2 2 6: 2 1999 4 1 2 3 1 2 question_5 group altGroup sClass date_qtrly 1: 2 A a S 1997-07-01 2: 2 A a S 1997-01-01 3: 3 A a S 1995-10-01 4: 3 A a S 1998-10-01 5: 3 A a S 2001-07-01 6: 1 A a S 1999-10-01 > # adapt the levels to positive, equal and negative > # in order to suit the naming defaults. other levels work too, > # but you'd need to specify multipliers in computeBalance then > levels(btsdemo$question_1) <- c("pos","eq","neg") > > # compute the weighted shares and display store in wide format > # to get a basis for further steps > level1 <- computeShares(btsdemo,"question_1","weight", + by = c("date_qtrly","group", "altGroup", "sClass")) Error in eval(expr, envir, enclos) : object '1109' not found Calls: computeShares -> [ -> [.data.table -> eval -> eval Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR, 1 NOTE