Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Created a package name when none found

Tags:

r

data.table

rcpp

Every time I update R something must happen... Anyway, this time (apparently only for data.table, other packg like ggplot2 and all those imported by it are fine) I get this:

> library("data.table", lib.loc="C:/Program Files/R/R-3.0.2/library")
data.table 1.8.10  For help type: help("data.table")
> detach("package:data.table", unload=TRUE)
Warning messages:
1: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found
2: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found
3: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found
4: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found
5: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found
6: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-04 18:33:03’, when none found

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.0.2

Same exact output when uninstalling the package and reinstalling from source using Rtools. They just warnings I know but I'm curious/a bit worried if this will imply something else later on.

EDIT: with Rcpp as well (30 warnings) and differently than data.table, Rpcc is not working:

> evalCpp('2 * M_PI')
Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput = showOutput,  : 
  SET_VECTOR_ELT() can only be applied to a 'list', not a 'symbol'
like image 475
Michele Avatar asked Oct 02 '22 18:10

Michele


1 Answers

The warning is sent by the getPackageName() function, when called e.g. on the parent.env of the data.table namespace.

Here's the relevant part of the calls stack:

# where 3: sapply(where, getPackageName)
# where 4: findClass(what, classWhere)
# where 5: .removeSuperclassBackRefs(cl, cldef, searchWhere)
# where 6: methods:::cacheMetaData(ns, FALSE, ns)
# where 7: unloadNamespace(pkgname)

... # where 11: tryCatch(unloadNamespace(pkgname), error = function(e) warning(gettextf("%s namespace cannot be unloaded:\n ", # sQuote(pkgname)), conditionMessage(e), call. = FALSE, domain = NA)) # where 12: detach("package:data.table", unload = TRUE)

For instance, try:

getPackageName(parent.env(getNamespace('data.table')))

and

findClass('data.frame', getNamespace('data.table'))

It is fixed in R-devel (not verified by myself but I trust J. Chambers on this one).

like image 131
Karl Forner Avatar answered Oct 19 '22 21:10

Karl Forner