-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable load package after install #5030
Comments
useDynLib(datatable, .registration=TRUE)
## For S4-ization
import(methods)
exportClasses(data.table, IDate, ITime)
##
export(data.table, tables, setkey, setkeyv, key, "key<-", haskey, CJ, SJ, copy)
export(setindex, setindexv, indices)
export(as.data.table,is.data.table,test.data.table)
export(last,first,like,"%like%","%ilike%","%flike%",between,"%between%",inrange,"%inrange%")
export(timetaken)
export(truelength, setalloccol, alloc.col, ":=")
export(setattr, setnames, setcolorder, set, setDT, setDF)
export(setorder, setorderv)
export(setNumericRounding, getNumericRounding)
export(chmatch, "%chin%", chorder, chgroup)
export(rbindlist)
export(fifelse)
export(fcase)
export(fread)
export(fwrite)
export(foverlaps)
export(shift)
export(transpose)
export(tstrsplit)
export(frank)
export(frankv)
export(address)
export(.SD,.N,.I,.GRP,.NGRP,.BY,.EACHI)
export(rleid)
export(rleidv)
export(rowid)
export(rowidv)
export(uniqueN)
export(setDTthreads, getDTthreads)
# set operators
export(fintersect)
export(fsetdiff)
export(funion)
export(fsetequal)
S3method(all.equal, data.table)
export(shouldPrint)
export(fsort) # experimental parallel sort for vector type double only, currently
# grouping sets
export(groupingsets)
export(cube)
export(rollup)
S3method(groupingsets, data.table)
S3method(cube, data.table)
S3method(rollup, data.table)
export(frollmean)
export(frollsum)
export(frollapply)
export(nafill)
export(setnafill)
export(.Last.updated)
export(fcoalesce)
S3method("[", data.table)
S3method("[<-", data.table)
# S3method("[[", data.table)
# S3method("[[<-", data.table)
S3method("$<-", data.table)
S3method(print, data.table)
S3method(as.data.table, data.table)
S3method(as.data.table, data.frame)
S3method(as.data.table, array)
S3method(as.data.table, matrix)
S3method(as.data.table, list)
S3method(as.data.table, integer)
S3method(as.data.table, numeric)
S3method(as.data.table, character)
S3method(as.data.table, logical)
S3method(as.data.table, factor)
S3method(as.data.table, ordered)
S3method(as.data.table, Date)
S3method(as.data.table, ITime)
S3method(as.data.table, table)
S3method(as.data.table, default)
S3method(as.data.frame, data.table)
S3method(as.list, data.table)
S3method(as.matrix, data.table)
if (getRversion() >= "4.0.0") {
# this version number must be the same as in .onLoad
# fix in R in Sep 2019 (#3948) makes c|rbind S3 dispatch work; see FAQ 2.24.
# if we register these (new in v1.12.6) methods always though, the previous workaround no longer works in R<4.0.0. Hence only register in R>=4.0.0.
S3method(cbind, data.table)
S3method(rbind, data.table)
}
# else {
# # and if we export but don't register in R < 4.0.0 we get this note:
# # > Found the following apparent S3 methods exported but not registered:
# # > cbind.data.table rbind.data.table
# # in addition to errors in tests 324, 326, 414.1, 414.2, 442, 445, 451
# export(cbind.data.table)
# export(rbind.data.table)
# # A revdep using rbind.data.frame() directly before (which data.table changed in base) should change to rbind() generic and that should work
# # in all combinations of R before/after 4.0.0 and data.table before/after 1.12.6, so long as data.table is installed using the same major
# # version of R (and that is checked in .onLoad with error if not).
# }
export(.rbind.data.table) # continue to export for now because it has been exported in the past so it may be depended on
S3method(dim, data.table)
S3method(dimnames, data.table)
S3method("dimnames<-", data.table)
S3method("names<-", data.table)
S3method(duplicated, data.table)
S3method(unique, data.table)
S3method(merge, data.table)
export(merge.data.table) #2618
S3method(subset, data.table)
S3method(transform, data.table)
S3method(within, data.table)
S3method(is.na, data.table)
S3method(format, data.table)
S3method(Ops, data.table)
S3method(anyDuplicated, data.table)
S3method(split, data.table)
export(dcast, melt)
S3method(dcast, data.table)
S3method(melt, data.table)
# exported for historical reasons -- if reshape2 is higher on search path,
# dcast(DT) will not dispatch since reshape2::dcast is not generic. So users
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
export(melt.data.table, dcast.data.table)
import(utils)
S3method(update, dev.pkg)
export(update.dev.pkg)
S3method(tail, data.table)
S3method(head, data.table)
import(stats)
S3method(na.omit, data.table)
S3method(as.data.table, xts)
if (getRversion() >= "3.6.0") {
export(as.xts.data.table) # fails in R-devel if not exported too, but I don't understand why
S3method(xts::as.xts, data.table) # delayed registration (new in R-devel) -- shouldn't this also export as.xts.data.table for us?
} else {
export(as.xts.data.table) # this on some configuration happens to fail as.xts dispatch to dt method #3286
}
# IDateTime support:
export(as.IDate,as.ITime,IDateTime)
export(second,minute,hour,yday,wday,mday,week,isoweek,month,quarter,year)
S3method("[", ITime)
S3method("+", IDate)
S3method("-", IDate)
S3method(as.character, ITime)
S3method(as.data.frame, ITime)
S3method(as.Date, IDate) # note that base::as.Date is masked by zoo::as.Date, #1500 #4777
S3method(as.IDate, Date)
S3method(as.IDate, POSIXct)
S3method(as.IDate, default)
S3method(as.IDate, numeric)
S3method(as.ITime, character)
S3method(as.ITime, default)
S3method(as.ITime, POSIXct)
S3method(as.ITime, numeric)
S3method(as.ITime, POSIXlt)
S3method(as.ITime, times)
S3method(as.list, IDate)
S3method(as.POSIXct, IDate)
S3method(as.POSIXct, ITime)
S3method(as.POSIXlt, ITime)
S3method(c, IDate)
S3method(c, ITime)
S3method(cut, IDate)
S3method(format, ITime)
S3method(IDateTime, default)
S3method(mean, IDate)
S3method(mean, ITime)
S3method(print, ITime)
S3method(rep, IDate)
S3method(rep, ITime)
S3method(round, IDate)
S3method(round, ITime)
S3method(trunc, ITime)
S3method(seq, IDate)
S3method(seq, ITime)
S3method(unique, IDate)
S3method(unique, ITime)
S3method('[<-', IDate)
S3method(edit, data.table) copied the
|
have you tried a clean install? remove data.table first, restart the computer & install again? the error looks quite unexpected, we should eliminate first the possibility that your installation wound up in a bad state somehow |
Ttried but same... Option 1+> install.packages('data.table')
...
...
...
+installing to /usr/lib/R/library/00LOCK-data.table/00new/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
-Error: package or namespace load failed for ‘data.table’ in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
-Error in namespaceExport(ns, exports) : undefined exports: class ITime
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> loadNamespace -> namespaceExport
** testing if installed package keeps a record of temporary installation path
* DONE (data.table)
The downloaded source packages are in
'/tmp/RtmpJ6txW1/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Loading required package: data.table
-Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
- undefined exports: class ITime
data.table
FALSE Option 2+>install.packages('data.table', dependencies = TRUE, INSTALL_opts = '--no-lock')
-id datatable.so datatable.so; fi
installing to /usr/lib/R/library/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
-Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
- undefined exports: class ITime
-Error: loading failed
* DONE (data.table)
The downloaded source packages are in
'/tmp/RtmpsvMQa1/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done Option 3+> library('data.table')
ℹ data.table not installed. Trying to install now
ℹ Installing data.table
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
-Error: package or namespace load failed for 'data.table' in get(Info[i, 1], envir = env):
- lazy-load database '/usr/lib/R/library/data.table/R/data.table.rdb' is corrupt
!In addition: Warning message:
!In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1 |
Are you installing in R console or in an IDE, like RStudio? Could you try in R console? Also please put full output of sessionInfo(). |
Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
undefined exports: class ITime
Error: loading failed
* DONE (data.table)
The downloaded source packages are in
'/tmp/RtmpQFanBg/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done RStudio & R_console, same error~ > session_info()$platform
setting value
version R version 4.1.0 (2021-05-18)
os Ubuntu 20.04.2 LTS
system x86_64, linux-gnu
ui X11
language en
collate en_US.UTF-8
ctype C
tz Asia/Tokyo
date 2021-06-0 |
simple and working smoothly on RStudio.Cloud but RStudio IDE and R console long story and doesn't work... will setup own computer as a RStudio Server Psiphon3 is not working smoothly in Linux (Win OS will be able to adjust the tunnel RStudio.Cloud working smoothly but limited 3GB workspace for every single project and cannot install other packages without |
Sorry @englianhu I've still no idea what's going wrong. One more thing to try -- can you run
|
ran above code and try library('data.table')
ℹ data.table not installed. Trying to install now
ℹ Installing data.table
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Error: package or namespace load failed for 'data.table' in namespaceExport(ns, exports):
undefined exports: class ITime |
download the and move the package to :~$ sudo apt-get install rsync -y
:~$ rsync -a source/ target/ enter to R and read the package from :~$ R
R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
The following objects are masked from package:base:
!, print.function
x wifi | v ethernet
#rsessions: 2
[Previously saved workspace restored]
v
> library(data.table)
data.table 1.14.1 IN DEVELOPMENT built 2021-06-04 07:59:53 UTC using 2 threads (see ?getDTthreads). Latest news: r-datatable.com
Attaching package: 'data.table'
The following objects are masked from 'package:lubridate':
hour, isoweek, mday, minute, month, quarter, second, wday, week, yday, year
The following objects are masked from 'package:dplyr':
between, first, last
The following object is masked from 'package:purrr':
transpose |
@englianhu from your last comment it doesn't seem that the issue has been fix but you just found a workaround. Could you please run the following code and provide complete console output. sessionInfo()
install.packages("data.table") Please do not use RStudio, RStudio server or other IDE, use R console directly. |
🇨🇳: 参照 aoles/EBImage#56 (comment) 即可安装成功。 |
DatabaseConnector
on 🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)
OHDSI/DatabaseConnector#196
#
Minimal reproducible example
#
Output of sessionInfo()
The text was updated successfully, but these errors were encountered: