不幸的是,我的代码不可共享,因为它是用于公司项目的,但我完全迷失了这个错误。我已经卸载并重新安装了 data.table 仍然没有修复。奇怪的是,我认为这个错误也会在本地发生,但事实并非如此!data.table 在本地工作正常。我想要一个可重现的例子,但我想不出来,因为它在本地工作!
编辑:好的,我想发生的事情如下
###Coerce to factors for clean 2x2's.
a_tab <- factor(data_fin$a_result_final,levels = c("Positive","Negative"))
t_tab <- factor(data_fin$t_result_final,levels = c("Positive","Negative"))
p_tab <- factor(data_fin$p_result_final,levels = c("Positive","Negative"))
tdf <- data.frame(a_tab,c_tab,p_tab)
#Create contingency tables
table <- table(tdf$a_tab,tdf$c_tab,dnn = c("Test 1","Test 2")) %>%
addmargins(margin = c(1,2),FUN = sum)
print('made B Table')
table_2 <- table(tdf$a_tab,tdf$c_tab,dnn = c("Test 1","Test 3")) %>%
addmargins(margin = c(1,2),FUN = sum)
print('made C Table')
Warning:Error: object 'CcopyNamedInList' not found
我无法共享数据,但这些因素来自一个包含多个数据条目的数据框,这些数据条目包括“正”、“负”和“无效”。希望这遵循更好的提问标准。
编辑:好的,所以我一直在重新启动 R 并运行您列出的说明`
test.data.table()
getDTthreads(verbose=TRUE):
omp_get_num_procs() 4
R_DATATABLE_NUM_PROCS_PERCENT unset (default 50)
R_DATATABLE_NUM_THREADS unset
omp_get_thread_limit() 2147483647
omp_get_max_threads() 4
OMP_THREAD_LIMIT unset
OMP_NUM_THREADS unset
RestoreAfterFork true
data.table is using 2 threads. See ?setDTthreads.
test.data.table() running: C:/Users/jkramp/Documents/R/win-library/3.6/data.table/tests/tests.Rraw.bz2
Running test id 2120.08
10 longest running tests took 56s (33% of 168s)
ID time nTest
1: 1438 8.58 738
2: 1835 8.38 1
3: 1648 6.17 91
4: 1652 5.74 91
5: 1650 5.71 91
6: 1223 5.39 728
7: 1848 4.39 1
8: 1644 4.30 91
9: 1642 4.19 91
10: 1646 4.12 91
endian==little, sizeof(long double)==16, sizeof(pointer)==8, TZ=America/Los_Angeles, locale='LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252', l10n_info()='MBCS=FALSE; UTF-8=FALSE; Latin-1=TRUE; codepage=1252', getDTthreads()='omp_get_num_procs()==4; R_DATATABLE_NUM_PROCS_PERCENT==unset (default 50); R_DATATABLE_NUM_THREADS==unset; omp_get_thread_limit()==2147483647; omp_get_max_threads()==4; OMP_THREAD_LIMIT==unset; OMP_NUM_THREADS==unset; RestoreAfterFork==true; data.table is using 2 threads. See ?setDTthreads.'
All 9643 tests in tests/tests.Rraw.bz2 completed ok in 00:02:48 elapsed (00:01:50 cpu) on Fri Oct 25 14:22:24 2019
install.packages('expss')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/jkramp/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/expss_0.9.1.zip'
Content type 'application/zip' length 1867278 bytes (1.8 MB)
downloaded 1.8 MB
package ‘expss’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\jkramp\AppData\Local\Temp\Rtmpy49ttd\downloaded_packages
一切似乎都安装得很好。我也重新安装了expss。我确实收到了关于 Rtools 的警告,但我认为这可能是一个单独的问题?这是我闪亮日志的直接输出:
2019-10-25T21:44:01.961646+00:00 shinyapps[929961]: Warning: Error in data.table: object 'CcopyNamedInList' not found
2019-10-25T21:44:01.966388+00:00 shinyapps[929961]: 67: lapply
2019-10-25T21:44:01.966383+00:00 shinyapps[929961]: 75: data.table
2019-10-25T21:44:01.966388+00:00 shinyapps[929961]: 66: multi_cro
2019-10-25T21:44:01.966384+00:00 shinyapps[929961]: 74: make_datatable_for_cro
2019-10-25T21:44:01.966389+00:00 shinyapps[929961]: 65: cro
2019-10-25T21:44:01.966385+00:00 shinyapps[929961]: 73: elementary_cro
2019-10-25T21:44:01.966386+00:00 shinyapps[929961]: 72: FUN
2019-10-25T21:44:01.966386+00:00 shinyapps[929961]: 71: lapply
2019-10-25T21:44:01.966640+00:00 shinyapps[929961]: Error in data.table(cell_var, col_var, weight) :
2019-10-25T21:44:01.966641+00:00 shinyapps[929961]: object 'CcopyNamedInList' not found
2019-10-25T21:44:01.966391+00:00 shinyapps[929961]: 61: server [/srv/connect/apps/1143_r_dashboard/app.R#192]
2019-10-25T21:44:01.966389+00:00 shinyapps[929961]: 64: as.etable.table
该应用程序似乎在使用 expss 的过程中崩溃,但说这是一个 data.table 问题。安装和更新 expss 似乎并不能解决我的闪亮问题,但它再次在本地工作。