I am a beginner in R and also new to data.table
package, and have been using it to perform computation-intensive applications. So far, it's been a great experience.
I was reading the latest data.table
package release notes at https://cran.r-project.org/web/packages/data.table/data.table.pdf , and found that data.table has a unique()
(Page 32 of the PDF above) as well. However, I am unable to find this function in data.table package. I found uniqueN
. I couldn't even find duplicated()
. I am not sure why this is the case.
I also found thread that talks about unique()
from data.table package. I am assuming that they are not using unique() from base R.
Here's my SessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grDevices datasets stats graphics grid tcltk utils methods base
other attached packages:
[1] Hmisc_4.0-2 Formula_1.2-1 survival_2.40-1 magrittr_1.5
[5] stringr_1.1.0 bit64_0.9-5 bit_1.1-12 tufterhandout_1.2.1
[9] knitr_1.15.1 rmarkdown_1.3 tufte_0.2 corrplot_0.77
[13] purrr_0.2.2 readr_1.0.0 tibble_1.2 tidyverse_1.0.0
[17] cowplot_0.7.0 plotly_4.5.6 ggplot2_2.2.1 maps_3.1.1
[21] directlabels_2015.12.16 tidyr_0.6.1 ggthemes_3.3.0 R2HTML_2.3.2
[25] lubridate_1.6.0 xts_0.9-7 zoo_1.7-14 lattice_0.20-34
[29] corrgram_1.10 hexbin_1.27.1 sm_2.2-5.4 compare_0.2-6
[33] installr_0.18.0 psych_1.6.12 reshape2_1.4.2 readstata13_0.8.5
[37] pastecs_1.3-18 boot_1.3-18 vcd_1.4-3 car_2.1-4
[41] xlsxjars_0.6.1 rJava_0.9-8 debug_1.3.1 dplyr_0.5.0
[45] foreign_0.8-67 gmodels_2.16.2 openxlsx_4.0.0 plyr_1.8.4
loaded via a namespace (and not attached):
[1] minqa_1.2.4 colorspace_1.3-2 class_7.3-14 modeltools_0.2-21 mclust_5.2.1
[6] rprojroot_1.1 htmlTable_1.8 base64enc_0.1-3 MatrixModels_0.4-1 flexmix_2.3-13
[11] mvtnorm_1.0-5 codetools_0.2-15 splines_3.3.2 mnormt_1.5-5 robustbase_0.92-7
[16] jsonlite_1.2 nloptr_1.0.4 pbkrtest_0.4-6 cluster_2.0.5 kernlab_0.9-25
[21] httr_1.2.1 backports_1.0.4 assertthat_0.1 Matrix_1.2-7.1 lazyeval_0.2.0
[26] acepack_1.4.1 htmltools_0.3.5 quantreg_5.29 tools_3.3.2 gtable_0.2.0
[31] Rcpp_0.12.8 trimcluster_0.1-2 gdata_2.17.0 nlme_3.1-128 iterators_1.0.8
[36] fpc_2.1-10 lmtest_0.9-34 lme4_1.1-12 gtools_3.5.0 dendextend_1.3.0
[41] DEoptimR_1.0-8 MASS_7.3-45 scales_0.4.1 TSP_1.1-4 parallel_3.3.2
[46] SparseM_1.74 RColorBrewer_1.1-2 gridExtra_2.2.1 rpart_4.1-10 latticeExtra_0.6-28
[51] stringi_1.1.2 gclus_1.3.1 mvbutils_2.7.4.1 foreach_1.4.3 checkmate_1.8.2
[56] seriation_1.2-1 caTools_1.17.1 prabclus_2.2-6 bitops_1.0-6 evaluate_0.10
[61] htmlwidgets_0.8 R6_2.2.0 gplots_3.0.1 DBI_0.5-1 whisker_0.3-2
[66] mgcv_1.8-16 nnet_7.3-12 KernSmooth_2.23-15 data.table_1.10.0 digest_0.6.11
[71] diptest_0.75-7 stats4_3.3.2 munsell_0.4.3 registry_0.3 viridisLite_0.1.3
[76] quadprog_1.5-5
I also went through Data table error could not find function "." thread, ran the command install.packages("data.table", type="source", dependencies=TRUE)
, but nothing happened.
To clarify, when I say I am unable to find, here's what happens:
First issue: When I type data.table:: on RStudio, it automatically populates all functions, but it doesn't show me data.table::unique
or even data.table::duplicated
.
Second issue: Even if I assume that RStudio is having some issues, if I call data.table::unique
or even data.table:::unique.data.table
, I get the error message saying, Error: 'unique' is not an exported object from 'namespace:data.table'.
I'd sincerely appreciate any thoughts and help.