title: R shiny app works locally, but after deployment, I get an error with I believe data.table: object 'CcopyNamedInList' not found
body: <p>Unfortunately, my code is not shareable since it is for a company project, but I'm completely lost with this error. I've uninstalled and reinstalled data.table and still no fix. The weird thing is that I would think this error would occur locally as well, but it doesn't! data.table works fine locally. I'd like to have a reproducible example, but I can't figure one out because it works locally!</p>
  
  <p>EDIT: Okay I guess what is happening is the following</p>
  
  <pre><code>###Coerce to factors for clean 2x2's.
  a_tab &lt;- factor(data_fin$a_result_final,levels = c("Positive","Negative")) 
  t_tab &lt;- factor(data_fin$t_result_final,levels = c("Positive","Negative"))
  p_tab &lt;- factor(data_fin$p_result_final,levels = c("Positive","Negative"))
  
  tdf &lt;- data.frame(a_tab,c_tab,p_tab)
  
  #Create contingency tables
  table &lt;- table(tdf$a_tab,tdf$c_tab,dnn = c("Test 1","Test 2")) %&gt;%
    addmargins(margin = c(1,2),FUN = sum)
  print('made B Table')
  table_2 &lt;- table(tdf$a_tab,tdf$c_tab,dnn = c("Test 1","Test 3")) %&gt;%
    addmargins(margin = c(1,2),FUN = sum)
  print('made C Table')
  
  Warning:Error: object 'CcopyNamedInList' not found
  </code></pre>
  
  <p>I can't share the data, but the factors come from a data frame containing several data entries along the lines of 'Positive','Negative', and 'Invalid'. Hopefully this follows better standards of question asking. </p>
  
  <p>EDIT:
  Okay, so I have been restarting R and running the instructions you have listed `</p>
  
  <pre><code>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
  
  </code></pre>
  
  <p>Everything seems to be installed fine. I also have reinstalled expss. I do get a warning about Rtools, but I think that may be a separate issue? Here is a direct output from my shiny logs:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The app seems to crash in the middle of using expss, but says that it's a data.table problem. installing and updating expss does not seem to fix my problem on shiny, but again it works locally.</p>