From 124c55a6a9d6df79ed3bc8519e1c32654f4b756b Mon Sep 17 00:00:00 2001 From: venom1204 Date: Mon, 23 Dec 2024 01:59:12 +0530 Subject: [PATCH] errors removed --- ..Rcheck/00check.log | 171 + ..Rcheck/00install.out | 25 + ..Rcheck/Rdlatex.log | 3059 +++ ..Rcheck/data.table-Ex.Rout | 7153 ++++++ ..Rcheck/data.table-Ex.pdf | Bin 0 -> 3611 bytes ..Rcheck/data.table-manual.log | 1878 ++ ..Rcheck/data.table-manual.pdf | Bin 0 -> 506755 bytes ..Rcheck/data.table/DESCRIPTION | 109 + ..Rcheck/data.table/INDEX | 78 + ..Rcheck/data.table/LICENSE | 373 + ..Rcheck/data.table/Meta/Rd.rds | Bin 0 -> 3468 bytes ..Rcheck/data.table/Meta/features.rds | Bin 0 -> 123 bytes ..Rcheck/data.table/Meta/hsearch.rds | Bin 0 -> 3477 bytes ..Rcheck/data.table/Meta/links.rds | Bin 0 -> 2068 bytes ..Rcheck/data.table/Meta/nsInfo.rds | Bin 0 -> 1623 bytes ..Rcheck/data.table/Meta/package.rds | Bin 0 -> 2323 bytes ..Rcheck/data.table/NAMESPACE | 208 + ..Rcheck/data.table/NEWS.md | 1018 + ..Rcheck/data.table/R/data.table | 27 + ..Rcheck/data.table/R/data.table.rdb | Bin 0 -> 595346 bytes ..Rcheck/data.table/R/data.table.rdx | Bin 0 -> 5251 bytes ..Rcheck/data.table/cc | 2 + ..Rcheck/data.table/help/AnIndex | 259 + ..Rcheck/data.table/help/aliases.rds | Bin 0 -> 1928 bytes ..Rcheck/data.table/help/data.table.rdb | Bin 0 -> 382545 bytes ..Rcheck/data.table/help/data.table.rdx | Bin 0 -> 1637 bytes ..Rcheck/data.table/help/paths.rds | Bin 0 -> 643 bytes ..Rcheck/data.table/html/00Index.html | 682 + ..Rcheck/data.table/html/R.css | 130 + ..Rcheck/data.table/include/datatableAPI.h | 48 + ..Rcheck/data.table/libs/symbols.rds | Bin 0 -> 10950 bytes .../po/en@quot/LC_MESSAGES/R-data.table.mo | Bin 0 -> 91028 bytes .../po/en@quot/LC_MESSAGES/data.table.mo | Bin 0 -> 143608 bytes .../po/es/LC_MESSAGES/R-data.table.mo | Bin 0 -> 109554 bytes .../po/es/LC_MESSAGES/data.table.mo | Bin 0 -> 149017 bytes .../po/fr/LC_MESSAGES/R-data.table.mo | Bin 0 -> 107653 bytes .../po/fr/LC_MESSAGES/data.table.mo | Bin 0 -> 148710 bytes .../po/pt_BR/LC_MESSAGES/R-data.table.mo | Bin 0 -> 108469 bytes .../po/pt_BR/LC_MESSAGES/data.table.mo | Bin 0 -> 166623 bytes .../po/zh_CN/LC_MESSAGES/R-data.table.mo | Bin 0 -> 101720 bytes .../po/zh_CN/LC_MESSAGES/data.table.mo | Bin 0 -> 157866 bytes ..Rcheck/data.table/tests/1206FUT.txt.bz2 | Bin 0 -> 2515 bytes ..Rcheck/data.table/tests/2008head.csv.bz2 | Bin 0 -> 12060 bytes ..Rcheck/data.table/tests/530_fread.txt | 51 + .../data.table/tests/536_fread_fill_1.txt | 29 + .../data.table/tests/536_fread_fill_2.txt | 28 + .../tests/536_fread_fill_3_extreme.txt | 22 + .../data.table/tests/536_fread_fill_4.txt | 30 + ..Rcheck/data.table/tests/S4.Rraw | 111 + ..Rcheck/data.table/tests/SA2-by-DJZ.csv.gz | Bin 0 -> 5338 bytes ..Rcheck/data.table/tests/allchar.csv.gz | Bin 0 -> 39639 bytes .../data.table/tests/alluniquechar.csv.gz | Bin 0 -> 17682 bytes ..Rcheck/data.table/tests/bad.txt.bz2 | Bin 0 -> 414 bytes ..Rcheck/data.table/tests/benchmark.Rraw | 502 + ..Rcheck/data.table/tests/ch11b.dat.bgz | Bin 0 -> 627 bytes ..Rcheck/data.table/tests/ch11b.dat.bz2 | Bin 0 -> 543 bytes .../data.table/tests/colnames4096.csv.bz2 | Bin 0 -> 601 bytes ..Rcheck/data.table/tests/fillheader.csv.bz2 | Bin 0 -> 833 bytes ..Rcheck/data.table/tests/fread_blank.txt | 48 + ..Rcheck/data.table/tests/fread_blank2.txt | 32 + ..Rcheck/data.table/tests/fread_blank3.txt | 12 + .../data.table/tests/fread_line_error.csv.bz2 | Bin 0 -> 8325 bytes ..Rcheck/data.table/tests/froll.Rraw | 1117 + ..Rcheck/data.table/tests/gb18030.txt | 2 + .../data.table/tests/genotypes_genome.txt.bz2 | Bin 0 -> 1001 bytes ..Rcheck/data.table/tests/grr.csv.gz | Bin 0 -> 18181 bytes .../data.table/tests/isoweek_test.csv.bz2 | Bin 0 -> 4988 bytes .../data.table/tests/issue_1095_fread.txt.bz2 | Bin 0 -> 3490 bytes .../data.table/tests/issue_1113_fread.txt.bz2 | Bin 0 -> 1534 bytes .../tests/issue_1116_fread_few_lines.txt.gz | Bin 0 -> 75 bytes .../tests/issue_1116_fread_few_lines_2.txt.gz | Bin 0 -> 77 bytes ..Rcheck/data.table/tests/issue_1164_json.txt | 2 + .../data.table/tests/issue_1330_fread.txt | 8 + .../tests/issue_1462_fread_quotes.txt.gz | Bin 0 -> 1531 bytes ..Rcheck/data.table/tests/issue_1573_fill.txt | 8 + ..Rcheck/data.table/tests/issue_2051.csv.gz | Bin 0 -> 633 bytes .../tests/issue_2157_sampling_overlap.txt.gz | Bin 0 -> 12955 bytes ...ue_2157_sampling_reached_eof_early.txt.bz2 | Bin 0 -> 28710 bytes .../data.table/tests/issue_3400_fread.txt | Bin 0 -> 37 bytes ..Rcheck/data.table/tests/issue_563_fread.txt | 5 + ..Rcheck/data.table/tests/issue_773_fread.txt | 28 + .../data.table/tests/issue_785_fread.txt.gz | Bin 0 -> 644 bytes ..Rcheck/data.table/tests/iterations.txt.bz2 | Bin 0 -> 1355 bytes .../data.table/tests/melt-warning-1752.tsv.gz | Bin 0 -> 1169 bytes ..Rcheck/data.table/tests/melt_1754.R.gz | Bin 0 -> 3898 bytes .../data.table/tests/melt_1754_synth.csv.bz2 | Bin 0 -> 3482 bytes ..Rcheck/data.table/tests/multi-file.zip | Bin 0 -> 974 bytes ..Rcheck/data.table/tests/nafill.Rraw | 333 + ..Rcheck/data.table/tests/noquote.csv.gz | Bin 0 -> 32253 bytes ..Rcheck/data.table/tests/onecol4096.csv.bz2 | Bin 0 -> 371 bytes ..Rcheck/data.table/tests/other.Rraw | 775 + ..Rcheck/data.table/tests/programming.Rraw | 618 + .../data.table/tests/quoted_multiline.csv.bz2 | Bin 0 -> 19651 bytes ..Rcheck/data.table/tests/russellCRLF.tar | Bin 0 -> 10220 bytes ..Rcheck/data.table/tests/russellCRLF.zip | Bin 0 -> 467 bytes .../tests/session_aborted_fatal_error.txt.bz2 | Bin 0 -> 131 bytes ..Rcheck/data.table/tests/test0.txt.bz2 | Bin 0 -> 2849 bytes ..Rcheck/data.table/tests/test1372-1.Rdata | Bin 0 -> 697 bytes ..Rcheck/data.table/tests/test1372.Rdata | Bin 0 -> 3764 bytes ..Rcheck/data.table/tests/test2224.Rdata | Bin 0 -> 1580 bytes ..Rcheck/data.table/tests/test2233-43.Rdata | Bin 0 -> 351 bytes ..Rcheck/data.table/tests/tests.Rraw | 20704 ++++++++++++++++ ..Rcheck/data.table/tests/types.Rraw | 39 + ..Rcheck/data.table/tests/utf16be.txt | Bin 0 -> 18 bytes ..Rcheck/data.table/tests/utf16le.txt | Bin 0 -> 18 bytes .../data.table/tests/winallquoted.csv.bz2 | Bin 0 -> 9666 bytes ..Rcheck/tests/S4.R | 6 + ..Rcheck/tests/S4.Rout | 51 + ..Rcheck/tests/autoprint.R | 75 + ..Rcheck/tests/autoprint.Rout | 203 + ..Rcheck/tests/autoprint.Rout.save | 203 + ..Rcheck/tests/froll.R | 2 + ..Rcheck/tests/froll.Rout | 47 + ..Rcheck/tests/knitr.R | 9 + ..Rcheck/tests/knitr.Rmd | 11 + ..Rcheck/tests/knitr.Rout | 72 + ..Rcheck/tests/knitr.Rout.mock | 48 + ..Rcheck/tests/knitr.Rout.save | 72 + ..Rcheck/tests/main.R | 12 + ..Rcheck/tests/main.Rout | 62 + ..Rcheck/tests/nafill.R | 2 + ..Rcheck/tests/nafill.Rout | 52 + ..Rcheck/tests/other.R | 7 + ..Rcheck/tests/other.Rout | 26 + ..Rcheck/tests/programming.R | 2 + ..Rcheck/tests/programming.Rout | 52 + ..Rcheck/tests/startup.Rs | 4 + ..Rcheck/tests/types.R | 2 + ..Rcheck/tests/types.Rout | 51 + DESCRIPTION | 2 + R/merge.R | 24 +- src/symbols.rds | Bin 0 -> 10950 bytes 132 files changed, 40812 insertions(+), 9 deletions(-) create mode 100644 ..Rcheck/00check.log create mode 100644 ..Rcheck/00install.out create mode 100644 ..Rcheck/Rdlatex.log create mode 100644 ..Rcheck/data.table-Ex.Rout create mode 100644 ..Rcheck/data.table-Ex.pdf create mode 100644 ..Rcheck/data.table-manual.log create mode 100644 ..Rcheck/data.table-manual.pdf create mode 100644 ..Rcheck/data.table/DESCRIPTION create mode 100644 ..Rcheck/data.table/INDEX create mode 100644 ..Rcheck/data.table/LICENSE create mode 100644 ..Rcheck/data.table/Meta/Rd.rds create mode 100644 ..Rcheck/data.table/Meta/features.rds create mode 100644 ..Rcheck/data.table/Meta/hsearch.rds create mode 100644 ..Rcheck/data.table/Meta/links.rds create mode 100644 ..Rcheck/data.table/Meta/nsInfo.rds create mode 100644 ..Rcheck/data.table/Meta/package.rds create mode 100644 ..Rcheck/data.table/NAMESPACE create mode 100644 ..Rcheck/data.table/NEWS.md create mode 100644 ..Rcheck/data.table/R/data.table create mode 100644 ..Rcheck/data.table/R/data.table.rdb create mode 100644 ..Rcheck/data.table/R/data.table.rdx create mode 100644 ..Rcheck/data.table/cc create mode 100644 ..Rcheck/data.table/help/AnIndex create mode 100644 ..Rcheck/data.table/help/aliases.rds create mode 100644 ..Rcheck/data.table/help/data.table.rdb create mode 100644 ..Rcheck/data.table/help/data.table.rdx create mode 100644 ..Rcheck/data.table/help/paths.rds create mode 100644 ..Rcheck/data.table/html/00Index.html create mode 100644 ..Rcheck/data.table/html/R.css create mode 100644 ..Rcheck/data.table/include/datatableAPI.h create mode 100644 ..Rcheck/data.table/libs/symbols.rds create mode 100644 ..Rcheck/data.table/po/en@quot/LC_MESSAGES/R-data.table.mo create mode 100644 ..Rcheck/data.table/po/en@quot/LC_MESSAGES/data.table.mo create mode 100644 ..Rcheck/data.table/po/es/LC_MESSAGES/R-data.table.mo create mode 100644 ..Rcheck/data.table/po/es/LC_MESSAGES/data.table.mo create mode 100644 ..Rcheck/data.table/po/fr/LC_MESSAGES/R-data.table.mo create mode 100644 ..Rcheck/data.table/po/fr/LC_MESSAGES/data.table.mo create mode 100644 ..Rcheck/data.table/po/pt_BR/LC_MESSAGES/R-data.table.mo create mode 100644 ..Rcheck/data.table/po/pt_BR/LC_MESSAGES/data.table.mo create mode 100644 ..Rcheck/data.table/po/zh_CN/LC_MESSAGES/R-data.table.mo create mode 100644 ..Rcheck/data.table/po/zh_CN/LC_MESSAGES/data.table.mo create mode 100644 ..Rcheck/data.table/tests/1206FUT.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/2008head.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/530_fread.txt create mode 100644 ..Rcheck/data.table/tests/536_fread_fill_1.txt create mode 100644 ..Rcheck/data.table/tests/536_fread_fill_2.txt create mode 100644 ..Rcheck/data.table/tests/536_fread_fill_3_extreme.txt create mode 100644 ..Rcheck/data.table/tests/536_fread_fill_4.txt create mode 100644 ..Rcheck/data.table/tests/S4.Rraw create mode 100644 ..Rcheck/data.table/tests/SA2-by-DJZ.csv.gz create mode 100644 ..Rcheck/data.table/tests/allchar.csv.gz create mode 100644 ..Rcheck/data.table/tests/alluniquechar.csv.gz create mode 100644 ..Rcheck/data.table/tests/bad.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/benchmark.Rraw create mode 100644 ..Rcheck/data.table/tests/ch11b.dat.bgz create mode 100644 ..Rcheck/data.table/tests/ch11b.dat.bz2 create mode 100644 ..Rcheck/data.table/tests/colnames4096.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/fillheader.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/fread_blank.txt create mode 100644 ..Rcheck/data.table/tests/fread_blank2.txt create mode 100644 ..Rcheck/data.table/tests/fread_blank3.txt create mode 100644 ..Rcheck/data.table/tests/fread_line_error.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/froll.Rraw create mode 100644 ..Rcheck/data.table/tests/gb18030.txt create mode 100644 ..Rcheck/data.table/tests/genotypes_genome.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/grr.csv.gz create mode 100644 ..Rcheck/data.table/tests/isoweek_test.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/issue_1095_fread.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/issue_1113_fread.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/issue_1116_fread_few_lines.txt.gz create mode 100644 ..Rcheck/data.table/tests/issue_1116_fread_few_lines_2.txt.gz create mode 100644 ..Rcheck/data.table/tests/issue_1164_json.txt create mode 100644 ..Rcheck/data.table/tests/issue_1330_fread.txt create mode 100644 ..Rcheck/data.table/tests/issue_1462_fread_quotes.txt.gz create mode 100644 ..Rcheck/data.table/tests/issue_1573_fill.txt create mode 100644 ..Rcheck/data.table/tests/issue_2051.csv.gz create mode 100644 ..Rcheck/data.table/tests/issue_2157_sampling_overlap.txt.gz create mode 100644 ..Rcheck/data.table/tests/issue_2157_sampling_reached_eof_early.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/issue_3400_fread.txt create mode 100644 ..Rcheck/data.table/tests/issue_563_fread.txt create mode 100644 ..Rcheck/data.table/tests/issue_773_fread.txt create mode 100644 ..Rcheck/data.table/tests/issue_785_fread.txt.gz create mode 100644 ..Rcheck/data.table/tests/iterations.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/melt-warning-1752.tsv.gz create mode 100644 ..Rcheck/data.table/tests/melt_1754.R.gz create mode 100644 ..Rcheck/data.table/tests/melt_1754_synth.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/multi-file.zip create mode 100644 ..Rcheck/data.table/tests/nafill.Rraw create mode 100644 ..Rcheck/data.table/tests/noquote.csv.gz create mode 100644 ..Rcheck/data.table/tests/onecol4096.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/other.Rraw create mode 100644 ..Rcheck/data.table/tests/programming.Rraw create mode 100644 ..Rcheck/data.table/tests/quoted_multiline.csv.bz2 create mode 100644 ..Rcheck/data.table/tests/russellCRLF.tar create mode 100644 ..Rcheck/data.table/tests/russellCRLF.zip create mode 100644 ..Rcheck/data.table/tests/session_aborted_fatal_error.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/test0.txt.bz2 create mode 100644 ..Rcheck/data.table/tests/test1372-1.Rdata create mode 100644 ..Rcheck/data.table/tests/test1372.Rdata create mode 100644 ..Rcheck/data.table/tests/test2224.Rdata create mode 100644 ..Rcheck/data.table/tests/test2233-43.Rdata create mode 100644 ..Rcheck/data.table/tests/tests.Rraw create mode 100644 ..Rcheck/data.table/tests/types.Rraw create mode 100644 ..Rcheck/data.table/tests/utf16be.txt create mode 100644 ..Rcheck/data.table/tests/utf16le.txt create mode 100644 ..Rcheck/data.table/tests/winallquoted.csv.bz2 create mode 100644 ..Rcheck/tests/S4.R create mode 100644 ..Rcheck/tests/S4.Rout create mode 100644 ..Rcheck/tests/autoprint.R create mode 100644 ..Rcheck/tests/autoprint.Rout create mode 100644 ..Rcheck/tests/autoprint.Rout.save create mode 100644 ..Rcheck/tests/froll.R create mode 100644 ..Rcheck/tests/froll.Rout create mode 100644 ..Rcheck/tests/knitr.R create mode 100644 ..Rcheck/tests/knitr.Rmd create mode 100644 ..Rcheck/tests/knitr.Rout create mode 100644 ..Rcheck/tests/knitr.Rout.mock create mode 100644 ..Rcheck/tests/knitr.Rout.save create mode 100644 ..Rcheck/tests/main.R create mode 100644 ..Rcheck/tests/main.Rout create mode 100644 ..Rcheck/tests/nafill.R create mode 100644 ..Rcheck/tests/nafill.Rout create mode 100644 ..Rcheck/tests/other.R create mode 100644 ..Rcheck/tests/other.Rout create mode 100644 ..Rcheck/tests/programming.R create mode 100644 ..Rcheck/tests/programming.Rout create mode 100644 ..Rcheck/tests/startup.Rs create mode 100644 ..Rcheck/tests/types.R create mode 100644 ..Rcheck/tests/types.Rout create mode 100644 src/symbols.rds diff --git a/..Rcheck/00check.log b/..Rcheck/00check.log new file mode 100644 index 0000000000..0038244ad6 --- /dev/null +++ b/..Rcheck/00check.log @@ -0,0 +1,171 @@ +* using log directory ‘/home/vinni/data.table/..Rcheck’ +* using R version 4.3.3 (2024-02-29) +* using platform: x86_64-pc-linux-gnu (64-bit) +* R was compiled by + gcc (Ubuntu 13.2.0-23ubuntu3) 13.2.0 + GNU Fortran (Ubuntu 13.2.0-23ubuntu3) 13.2.0 +* running under: Linux Mint 22 +* using session charset: UTF-8 +* checking for file ‘./DESCRIPTION’ ... OK +* this is package ‘data.table’ version ‘1.16.99’ +* package encoding: UTF-8 +* checking package namespace information ... OK +* checking package dependencies ... OK +* checking if this is a source package ... WARNING +Subdirectory ‘data.table/src’ contains apparent object files/libraries + assign.o between.o bmerge.o chmatch.o cj.o coalesce.o data_table.so + dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o + fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o + fwriteR.o gsumm.o idatetime.o ijoin.o init.o inrange.o nafill.o + negate.o nqrecreateindices.o openmp-utils.o programming.o + quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o + transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o +Object files/libraries should not be included in a source package. +* checking if there is a namespace ... OK +* checking for executable files ... OK +* checking for hidden files and directories ... NOTE +Found the following hidden files and directories: + .ci/.lintr.R + .dev/.Rprofile + .dev/.bash_aliases + .devcontainer/.Rprofile + .gitattributes + .github/.gitignore + .gitignore + .gitlab-ci.yml + vignettes/.check.translations.R + ..Rcheck + .ci + .dev + .devcontainer + .git + .github + .graphics +These were most likely included in error. See section ‘Package +structure’ in the ‘Writing R Extensions’ manual. +* checking for portable file names ... OK +* checking for sufficient/correct file permissions ... OK +* checking whether package ‘data.table’ can be installed ... OK +* used C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ +* checking installed package size ... NOTE + installed size is 6.1Mb + sub-directories of 1Mb or more: + libs 1.8Mb + po 1.3Mb + tests 1.9Mb +* checking package directory ... OK +* checking DESCRIPTION meta-information ... NOTE +Checking should be performed on sources prepared by ‘R CMD build’. +* checking top-level files ... OK +* checking for left-over files ... OK +* checking index information ... OK +* checking package subdirectories ... WARNING +Found the following directory with the name of a check directory: + ./..Rcheck +Most likely, these were included erroneously. +* checking R files for non-ASCII characters ... WARNING +Found the following file with non-ASCII characters: + merge.R +Portable packages must use only ASCII characters in their R code, +except perhaps in comments. +Use \uxxxx escapes for other characters. +* checking R files for syntax errors ... OK +* checking whether the package can be loaded ... OK +* checking whether the package can be loaded with stated dependencies ... OK +* checking whether the package can be unloaded cleanly ... OK +* checking whether the namespace can be loaded with stated dependencies ... OK +* checking whether the namespace can be unloaded cleanly ... OK +* checking loading without being on the library search path ... OK +* checking startup messages can be suppressed ... OK +* checking dependencies in R code ... OK +* checking S3 generic/method consistency ... OK +* checking replacement functions ... OK +* checking foreign function calls ... OK +* checking R code for possible problems ... OK +* checking Rd files ... OK +* checking Rd metadata ... OK +* checking Rd cross-references ... OK +* checking for missing documentation entries ... OK +* checking for code/documentation mismatches ... OK +* checking Rd \usage sections ... OK +* checking Rd contents ... OK +* checking for unstated dependencies in examples ... OK +* checking line endings in shell scripts ... OK +* checking line endings in C/C++/Fortran sources/headers ... OK +* checking line endings in Makefiles ... OK +* checking compilation flags in Makevars ... NOTE +Package has both ‘src/Makevars.in’ and ‘src/Makevars’. +Installation with --no-configure' is unlikely to work. If you intended +‘src/Makevars’ to be used on Windows, rename it to ‘src/Makevars.win’ +otherwise remove it. If ‘configure’ created ‘src/Makevars’, you need a +‘cleanup’ script. +* checking for GNU extensions in Makefiles ... WARNING +Found the following file(s) containing GNU extensions: + Makefile +Portable Makefiles do not use GNU extensions such as +=, :=, $(shell), +$(wildcard), ifeq ... endif, .NOTPARALLEL See section ‘Writing portable +packages’ in the ‘Writing R Extensions’ manual. +* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK +* checking use of PKG_*FLAGS in Makefiles ... OK +* checking include directives in Makefiles ... OK +* checking compiled code ... OK +* checking files in ‘vignettes’ ... WARNING +Files in the 'vignettes' directory but no files in 'inst/doc': + ‘Pitching.RData’ ‘Teams.RData’ ‘datatable-benchmarking.Rmd’ + ‘datatable-faq.Rmd’ ‘datatable-importing.Rmd’ ‘datatable-intro.Rmd’ + ‘datatable-joins.Rmd’ ‘datatable-keys-fast-subset.Rmd’ + ‘datatable-programming.Rmd’ ‘datatable-reference-semantics.Rmd’ + ‘datatable-reshape.Rmd’ ‘datatable-sd-usage.Rmd’ + ‘datatable-secondary-indices-and-auto-indexing.Rmd’ ‘flights14.csv’ + ‘fr/datatable-benchmarking.Rmd’ ‘fr/datatable-faq.Rmd’ + ‘fr/datatable-importing.Rmd’ ‘fr/datatable-intro.Rmd’ + ‘fr/datatable-keys-fast-subset.Rmd’ ‘fr/datatable-programming.Rmd’ + ‘fr/datatable-reference-semantics.Rmd’ ‘fr/datatable-reshape.Rmd’ + ‘fr/datatable-sd-usage.Rmd’ + ‘fr/datatable-secondary-indices-and-auto-indexing.Rmd’ + ‘plots/grouping_illustration.png’ +* checking examples ... OK +* checking for unstated dependencies in ‘tests’ ... OK +* checking tests ... OK + Running ‘S4.R’ + Running ‘autoprint.R’ + Comparing ‘autoprint.Rout’ to ‘autoprint.Rout.save’ ... OK + Running ‘froll.R’ + Running ‘knitr.R’ + Comparing ‘knitr.Rout’ to ‘knitr.Rout.save’ ... OK + Running ‘main.R’ + Running ‘nafill.R’ + Running ‘other.R’ + Running ‘programming.R’ + Running ‘types.R’ +* checking for unstated dependencies in vignettes ... OK +* checking package vignettes in ‘inst/doc’ ... WARNING +Directory 'inst/doc' does not exist. +Package vignettes without corresponding single PDF/HTML: + ‘datatable-benchmarking.Rmd’ + ‘datatable-faq.Rmd’ + ‘datatable-importing.Rmd’ + ‘datatable-intro.Rmd’ + ‘datatable-joins.Rmd’ + ‘datatable-keys-fast-subset.Rmd’ + ‘datatable-programming.Rmd’ + ‘datatable-reference-semantics.Rmd’ + ‘datatable-reshape.Rmd’ + ‘datatable-sd-usage.Rmd’ + ‘datatable-secondary-indices-and-auto-indexing.Rmd’ +* checking running R code from vignettes ... OK + ‘datatable-benchmarking.Rmd’ using ‘UTF-8’... OK + ‘datatable-faq.Rmd’ using ‘UTF-8’... OK + ‘datatable-importing.Rmd’ using ‘UTF-8’... OK + ‘datatable-intro.Rmd’ using ‘UTF-8’... OK + ‘datatable-joins.Rmd’ using ‘UTF-8’... OK + ‘datatable-keys-fast-subset.Rmd’ using ‘UTF-8’... OK + ‘datatable-programming.Rmd’ using ‘UTF-8’... OK + ‘datatable-reference-semantics.Rmd’ using ‘UTF-8’... OK + ‘datatable-reshape.Rmd’ using ‘UTF-8’... OK + ‘datatable-sd-usage.Rmd’ using ‘UTF-8’... OK + ‘datatable-secondary-indices-and-auto-indexing.Rmd’ using ‘UTF-8’... OK +* checking re-building of vignette outputs ... OK +* checking PDF version of manual ... OK +* DONE +Status: 6 WARNINGs, 4 NOTEs diff --git a/..Rcheck/00install.out b/..Rcheck/00install.out new file mode 100644 index 0000000000..9f02d2184d --- /dev/null +++ b/..Rcheck/00install.out @@ -0,0 +1,25 @@ +* installing *source* package ‘data.table’ ... +** using staged installation +gcc 13.3.0 +zlib 1.3 is available ok +* checking if R installation supports OpenMP without any extra hints... yes +** libs +using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ +gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -o data.table.so assign.o between.o bmerge.o chmatch.o cj.o coalesce.o dogroups.o fastmean.o fcast.o fifelse.o fmelt.o forder.o frank.o fread.o freadR.o froll.o frollR.o frolladaptive.o fsort.o fwrite.o fwriteR.o gsumm.o idatetime.o ijoin.o init.o inrange.o nafill.o negate.o nqrecreateindices.o openmp-utils.o programming.o quickselect.o rbindlist.o reorder.o shift.o snprintf.o subset.o transpose.o types.o uniqlist.o utils.o vecseq.o wrappers.o -fopenmp -lz -L/usr/lib/R/lib -lR +PKG_CFLAGS = -fopenmp +PKG_LIBS = -fopenmp -lz +if [ "data.table.so" != "data_table.so" ]; then mv data.table.so data_table.so; fi +if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id data_table.so data_table.so; fi +installing to /home/vinni/data.table/..Rcheck/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 +** checking absolute paths in shared objects and dynamic libraries +** testing if installed package can be loaded from final location +** testing if installed package keeps a record of temporary installation path +* DONE (data.table) diff --git a/..Rcheck/Rdlatex.log b/..Rcheck/Rdlatex.log new file mode 100644 index 0000000000..cdbb7dff26 --- /dev/null +++ b/..Rcheck/Rdlatex.log @@ -0,0 +1,3059 @@ +Hmm ... looks like a package +Converting parsed Rd's to LaTeX ...... +Creating pdf output from LaTeX ... + +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) + restricted \write18 enabled. +entering extended mode +LaTeX2e <2023-11-01> patch level 1 +L3 programming layer <2024-01-22> +(./Rd2.tex +(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls +Document Class: book 2023/05/17 v1.4n Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo)) +(/usr/share/R/share/texmf/tex/latex/Rd.sty +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/bm.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/verbatim.sty) +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/mathrsfs.sty) +(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/zi4.sty +`inconsolata-zi4' v1.12, 2019/05/17 Text macros for Inconsolata (msharpe) +(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty +(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) +(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) +(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) +(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def) +(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))) +(/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty) +Writing index file Rd2.idx +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd) +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) +No file Rd2.aux. +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +) (/usr/share/texlive/texmf-dist/tex/latex/inconsolata/t1zi4.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/ursfs.fd) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd) +No file Rd2.toc. +[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/share/texlive/texmf- +dist/fonts/enc/dvips/base/8r.enc}{/usr/share/texmf/fonts/enc/dvips/cm-super/cm- +super-ts1.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/inconsolata/i4-t1- +0.enc}] +Overfull \hbox (43.10059pt too wide) in paragraph at lines 63--63 + []\T1/zi4/m/n/10 data.table(..., keep.rownames=FALSE, check.names=FALSE, key=N +ULL, stringsAsFactors=FALSE) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/ts1zi4.fd) [2{/usr/share/t +exlive/texmf-dist/fonts/enc/dvips/inconsolata/i4-ts1.enc}] +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd) +Overfull \hbox (57.41945pt too wide) in paragraph at lines 114--115 +[]\T1/ptm/m/n/10 This is sum-marised in code as []\T1/zi4/m/n/10 min(length(key +(x)), if (haskey(i)) length(key(i)) + +Overfull \hbox (194.1307pt too wide) in paragraph at lines 124--125 +[]\T1/ptm/m/n/10 See [][][]\T1/zi4/m/n/10 vignette("datatable-keys-fast-subset" +)[][] []\T1/ptm/m/n/10 and [][][]\T1/zi4/m/n/10 vignette("datatable-secondary-i +ndices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Overfull \hbox (3.91003pt too wide) in paragraph at lines 129--130 +[]\T1/zi4/m/n/10 x$a []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 sum(x$a) []\T1/ptm/m +/n/10 as a vec-tor re-spec-tively. []\T1/zi4/m/n/10 x[, .(a, b)] []\T1/ptm/m/n/ +10 and []\T1/zi4/m/n/10 x[, .(sa=sum(a), +[3] +Overfull \hbox (34.84958pt too wide) in paragraph at lines 151--152 +[]\T1/ptm/m/n/10 a []\T1/zi4/m/n/10 list() []\T1/ptm/m/n/10 of ex-pres-sions of + col-umn names: e.g., []\T1/zi4/m/n/10 DT[, .(sa=sum(a)), by=.(x=x>0, + +Overfull \hbox (20.64027pt too wide) in paragraph at lines 162--163 +[]\T1/ptm/m/it/10 Advanced: \T1/ptm/m/n/10 When []\T1/zi4/m/n/10 i []\T1/ptm/m/ +n/10 is a []\T1/zi4/m/n/10 list []\T1/ptm/m/n/10 (or []\T1/zi4/m/n/10 data.fram +e []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 ), []\T1/zi4/ +m/n/10 DT[i, j, by=.EACHI] +[4] +Overfull \hbox (11.38815pt too wide) in paragraph at lines 181--182 +[]\T1/zi4/m/n/10 -Inf []\T1/ptm/m/n/10 rolls back-wards in-stead; i.e., next ob +-ser-va-tion car-ried back-ward (NOCB). + +Overfull \hbox (2.54861pt too wide) in paragraph at lines 207--208 +[]\T1/ptm/m/n/10 Inversion (col-umn drop-ping in-stead of keep-ing) can be ac-c +om-plished be prepend- + +Overfull \hbox (33.29951pt too wide) in paragraph at lines 209--210 +\T1/ptm/m/n/10 also in-vert a pat-tern as usual with []\T1/zi4/m/n/10 .SDcols=! +patterns(...) []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 .SDcols=!is.numeric[]\T1/ptm +/m/n/10 . +[5] +Overfull \hbox (64.98978pt too wide) in paragraph at lines 234--235 +[]\T1/ptm/m/n/10 See ex-am-ples as well as [][][]\T1/zi4/m/n/10 vignette("datat +able-secondary-indices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Underfull \hbox (badness 10000) in paragraph at lines 244--245 + +[6] +Underfull \hbox (badness 10000) in paragraph at lines 254--255 + + +Overfull \hbox (56.30783pt too wide) in paragraph at lines 268--268 + [] \T1/zi4/m/n/10 X[, a] # return col \TS1/zi4/m/n/10 +'\T1/zi4/m/n/10 a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 from X as vector. If not foun +d, search in parent frame.[] + +Overfull \hbox (19.66843pt too wide) in paragraph at lines 270--270 + [] \T1/zi4/m/n/10 X[, sum(a)] # return sum(a) as a vector ( +with same scoping rules as above)[] + +Overfull \hbox (129.66843pt too wide) in paragraph at lines 272--272 + [] \T1/zi4/m/n/10 X[, sum(a), by=c] # same as above, .() can be o +mitted in j and by on single expression for convenience[] + +Overfull \hbox (93.0188pt too wide) in paragraph at lines 273--273 + [] \T1/zi4/m/n/10 X[, sum(a), by=c:f] # get sum(a) grouped by all c +olumns in between \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 f\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (bot +h inclusive)[] + +Overfull \hbox (98.0188pt too wide) in paragraph at lines 275--275 + [] \T1/zi4/m/n/10 X[, sum(a), keyby=b] # get sum(a) grouped by \TS1/ +zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , and sort that res +ult by the grouping column \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '[] + + +Overfull \hbox (33.0597pt too wide) in paragraph at lines 277--277 + [] \T1/zi4/m/n/10 X[, sum(a), by=b][order(b)] # same order as above, but by + chaining compound expressions[] + +Overfull \hbox (86.34872pt too wide) in paragraph at lines 278--278 + [] \T1/zi4/m/n/10 X[c>1, sum(a), by=c] # get rows where c>1 is TRUE, + and on those rows, get sum(a) grouped by \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1 +/zi4/m/n/10 '[] + +Overfull \hbox (106.34872pt too wide) in paragraph at lines 279--279 + [] \T1/zi4/m/n/10 X[Y, .(a, b), on="c"] # get rows where Y$c == X$c, +and select columns \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4 +/m/n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$b\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 + for those rows[] + +Overfull \hbox (58.02902pt too wide) in paragraph at lines 280--280 + [] \T1/zi4/m/n/10 X[Y, .(a, i.a), on="c"] # get rows where Y$c == X$c, +and then select \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 Y$a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (= +i.a)[] + +Overfull \hbox (74.71954pt too wide) in paragraph at lines 281--281 + [] \T1/zi4/m/n/10 X[Y, sum(a*i.a), on="c", by=.EACHI] # for *each* \TS1/zi4 +/m/n/10 '\T1/zi4/m/n/10 Y$c\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , get sum(a*i.a) on +matching rows in \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$c\TS1/zi4/m/n/10 '[] + +Overfull \hbox (104.68887pt too wide) in paragraph at lines 283--283 + [] \T1/zi4/m/n/10 X[, plot(a, b), by=c] # j accepts any expression, g +enerates plot for each group and returns no data[] + +Overfull \hbox (53.0597pt too wide) in paragraph at lines 284--284 + [] \T1/zi4/m/n/10 # see ?assign to add/update/delete columns by reference u +sing the same consistent interface[] + +Overfull \hbox (21.24829pt too wide) in paragraph at lines 304--306 +\T1/ptm/m/n/10 umn called []\T1/zi4/m/n/10 keep []\T1/ptm/m/n/10 con-tain-ing [ +]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 and this is cor-rect be-haviour; []\T1/zi +4/m/n/10 data.table(DF, keep.rownames=TRUE) +[7] +Overfull \hbox (8.80103pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 special-symbols[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 data.frame[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 [.data.frame[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 as.data.table[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 setkey[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[ +][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][] +[]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (3.08105pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 SJ[][][][]\ +T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 tables[][][ +][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 test.data.table[][][][]\T1/ptm/m/n/10 +, [][][]\T1/zi4/m/n/10 IDateTime[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 u +nique.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[][][][]\T1/p +tm/m/n/10 , + +Overfull \hbox (14.401pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setallocco +l[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 + , [][][]\T1/zi4/m/n/10 rbindlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 +setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 datatable-optim +ize[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][][][]\T1/ptm/m/n/10 + , +[8] +Overfull \hbox (3.6858pt too wide) in paragraph at lines 379--379 + []\T1/zi4/m/n/9 DT[x=="a"] # same, single "==" internally +optimised to use binary search (fast)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [9] +Underfull \vbox (badness 10000) has occurred while \output is active [10] +Overfull \hbox (23.26248pt too wide) in paragraph at lines 483--483 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [11] +[12] (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmtt.fd) +(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmtt.fd) [13] +Overfull \hbox (306.25671pt too wide) in paragraph at lines 632--632 + [] \T1/zi4/m/n/10 DT[, col := val] # update (o +r add at the end if doesn\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 t exist) a column call +ed "col" with value "val" (recycled if necessary).[] + +Overfull \hbox (221.26694pt too wide) in paragraph at lines 633--633 + [] \T1/zi4/m/n/10 DT[i, col := val] # same as a +bove, but only for those rows specified in i and (for new columns) NA elsewhere +.[] + +Overfull \hbox (419.58664pt too wide) in paragraph at lines 635--635 + [] \T1/zi4/m/n/10 DT[i, (3:6) := val] # update ex +isting columns 3:6 with value. Aside: parens are not required here since : alre +ady makes LHS a call rather than a symbol.[] + +Overfull \hbox (218.00858pt too wide) in paragraph at lines 636--636 + [] \T1/zi4/m/n/10 DT[i, colvector := val, with = FALSE] # OLD synta +x. The contents of "colvector" in calling scope determine the column(s).[] + +Overfull \hbox (356.28738pt too wide) in paragraph at lines 637--637 + [] \T1/zi4/m/n/10 DT[i, (colvector) := val] # same (NOW + PREFERRED) shorthand syntax. The parens are enough to stop the LHS being a sym +bol; same as c(colvector).[] + +Overfull \hbox (226.82571pt too wide) in paragraph at lines 638--638 + [] \T1/zi4/m/n/10 DT[i, colC := mean(colB), by = colA] # update (o +r add) column called "colC" by reference by group. A major feature of \TS1/cmtt +/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 .[] + +Overfull \hbox (73.49579pt too wide) in paragraph at lines 654--654 + [] \T1/zi4/m/n/10 DT[, {col1 := 1L; col2 := 2L}] # Use the f +unctional form, \TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/ +n/10 (), instead (see above).[] +[14] +Overfull \hbox (21.07907pt too wide) in paragraph at lines 660--661 +\T1/ptm/m/n/10 rea-son why []\T1/zi4/m/n/10 := []\T1/ptm/m/n/10 has been im-ple +-mented in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 . Please see [][][]\T1/zi4/m/n/10 + vignette("datatable-reference-semantics")[][] +[15] [16] +Overfull \hbox (9.73488pt too wide) in paragraph at lines 765--765 + []\T1/zi4/m/n/9 # However, normally, we call [.data.table *once* on *large* da +ta, not many times on small data.[] +[17] +Overfull \hbox (71.21884pt too wide) in paragraph at lines 802--803 +[][][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / a / 10913296 / 403310$[ +][] \T1/ptm/m/n/10 (but im-ple-mented in C with-out us-ing []\T1/zi4/m/n/10 .In +ternal(inspect())[]\T1/ptm/m/n/10 ) + +Overfull \hbox (34.76044pt too wide) in paragraph at lines 827--827 + [] \T1/zi4/m/n/10 ignore.col.order=FALSE, ignore.row.order=FALSE, tolerance +=sqrt(.Machine$double.eps),[] + +Overfull \hbox (11.40001pt too wide) in paragraph at lines 835--837 +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s to com-pare. If []\T1/zi4/m/n/10 +current []\T1/ptm/m/n/10 is not a []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 , + but []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (4.11882pt too wide) in paragraph at lines 840--842 +\T1/ptm/m/n/10 are fac-tors be-fore run-ning equal-ity check. It ef-fect only w +hen []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (71.63823pt too wide) in paragraph at lines 845--846 +\T1/ptm/m/n/10 data.table but also at-tributes of the columns. It will skip []\ +T1/zi4/m/n/10 c("row.names",".internal.selfref") +[18] +Overfull \hbox (79.65813pt too wide) in paragraph at lines 857--858 +[]\T1/ptm/m/n/10 A nu-meric value used when com-par-ing nu-meric columns, by de +-fault []\T1/zi4/m/n/10 sqrt(.Machine$double.eps)[]\T1/ptm/m/n/10 . +[19] [20] +Overfull \hbox (15.57816pt too wide) in paragraph at lines 976--977 +[]\T1/zi4/m/n/10 keep.rownames []\T1/ptm/m/n/10 ar-gu-ment can be used to pre-s +erve the (row)names at-tribute in the re-sult-ing []\T1/zi4/m/n/10 data.table[] +\T1/ptm/m/n/10 . + +Overfull \hbox (26.40112pt too wide) in paragraph at lines 980--981 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 se +tDT[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , +[][][]\T1/zi4/m/n/10 copy[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setkey[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 SJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m +/n/10 , [][][]\T1/zi4/m/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setalloccol[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 , +[21] [22] [23] +Overfull \hbox (0.76248pt too wide) in paragraph at lines 1160--1160 + [] \T1/zi4/m/n/9 sample.dt <- data.table(date = as.Date((Sys.Date()-999):Sys. +Date(),origin="1970-01-01"),[] +[24] +Overfull \hbox (5.00627pt too wide) in paragraph at lines 1201--1204 +[]\T1/ptm/m/n/10 Any or-der-able vec-tor, i.e., those with rel-e-vant meth-ods +for []\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 <=\TS1/cmtt/m/n/10 `[]\T1/ptm/m/n/10 , s +uch as []\T1/zi4/m/n/10 numeric[]\T1/ptm/m/n/10 , + +Overfull \hbox (3.46771pt too wide) in paragraph at lines 1208--1211 +[]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 means in-clu-sive bounds, i.e., [lower,u +pper]. []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 means ex-clu-sive bounds, +[25] +Overfull \hbox (89.73999pt too wide) in paragraph at lines 1278--1278 + [] \T1/zi4/m/n/10 Rcpp::cppFunction("SEXP mysub2(SEXP x, SEXP rows, SEXP cols +) { return DT_subsetDT(x,rows,cols); }",[] +[26] [27] +Overfull \hbox (7.58745pt too wide) in paragraph at lines 1330--1331 +[]\T1/ptm/m/n/10 It may be pos-si-ble to speed up fast-match's hash ta-ble buil +d time by us-ing the tech-nique in []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 +, +[28] +Overfull \hbox (9.87895pt too wide) in paragraph at lines 1402--1403 +[]\T1/ptm/m/n/10 A []\T1/zi4/m/n/10 copy() []\T1/ptm/m/n/10 may be re-quired wh +en do-ing []\T1/zi4/m/n/10 dt_names = names(DT)[]\T1/ptm/m/n/10 . Due to R's \T +1/ptm/m/it/10 copy-on-modify\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 dt_names +[29] [30] +Overfull \hbox (12.18959pt too wide) in paragraph at lines 1508--1511 +[]\T1/ptm/m/n/10 The ex-pres-sion []\T1/zi4/m/n/10 DT[, lapply(.SD, fun), by=.] + []\T1/ptm/m/n/10 gets op-ti-mised to []\T1/zi4/m/n/10 DT[, list(fun(a), fun(b) +, +[31] [32] +Underfull \vbox (badness 10000) has occurred while \output is active [33] +[34] +Overfull \hbox (58.2086pt too wide) in paragraph at lines 1702--1703 +[]\T1/ptm/m/n/10 logical; []\T1/zi4/m/n/10 value.var.in.dots = TRUE []\T1/ptm/m +/n/10 is short-hand to save set-ting both []\T1/zi4/m/n/10 value.var.in.LHSdots + + +Overfull \hbox (10.00912pt too wide) in paragraph at lines 1709--1710 +\T1/ptm/m/n/10 vari-ables not oth-er-wise men-tioned in []\T1/zi4/m/n/10 formul +a[]\T1/ptm/m/n/10 , and []\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 de-pend-ing + on []\T1/zi4/m/n/10 value.var.in.LHSdots +[35] +Overfull \hbox (7.89836pt too wide) in paragraph at lines 1725--1726 +[]\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 is a char-ac-ter vec-tor or a list +of length one, each func-tion men-tioned un-der []\T1/zi4/m/n/10 fun.aggregate + +Overfull \hbox (7.31819pt too wide) in paragraph at lines 1727--1728 +[]\T1/ptm/m/n/10 Historical note: []\T1/zi4/m/n/10 dcast.data.table []\T1/ptm/m +/n/10 was orig-i-nally de-signed as an en-hance-ment to []\T1/zi4/m/n/10 reshap +e2::dcast +[36] +Overfull \hbox (15.71954pt too wide) in paragraph at lines 1761--1761 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=FALSE) # all missing combinations + of LHS and RHS[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1762--1762 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(FALSE, TRUE)) # all missing combinations + of LHS only[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1763--1763 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(TRUE, FALSE)) # all missing combinations + of RHS only[] + +Overfull \hbox (26.25021pt too wide) in paragraph at lines 1771--1771 + []\T1/zi4/m/n/9 dcast(DT, ... ~ v3, value.var="v4", value.var.in.dots=TRUE) # +same as v1+v2+v4~v3, value.var="v4"[] +[37] [38] +Overfull \hbox (23.92102pt too wide) in paragraph at lines 1892--1896 +[][][]\T1/zi4/m/n/10 setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 duplicated[][][][ +]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 all.equal[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][] +[][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 funion[][][][]\T1/ptm/m/n/10 , [][][] +\T1/zi4/m/n/10 fintersect[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (8.25941pt too wide) in paragraph at lines 1928--1928 + []\T1/zi4/m/n/9 unique(DT, by="B", fromLast=FALSE) # equivalent: DT[!duplicate +d(DT, by="B", fromLast=FALSE)][] +[39] [40] [41] [42] [43] [44] +Overfull \hbox (11.16714pt too wide) in paragraph at lines 2209--2212 +[]\T1/ptm/m/n/10 Usually, []\T1/zi4/m/n/10 x []\T1/ptm/m/n/10 is a very large d +ata.table with small in-ter-val ranges, and []\T1/zi4/m/n/10 y []\T1/ptm/m/n/10 + is much smaller \T1/ptm/m/it/10 keyed []\T1/zi4/m/n/10 data.table +[45] +Overfull \hbox (1.54832pt too wide) in paragraph at lines 2252--2262 +[]\T1/ptm/m/n/10 The types shown here are iden-ti-cal in func-tion-al-ity to th +e func-tion []\T1/zi4/m/n/10 findOverlaps +[46] +Overfull \hbox (1.8009pt too wide) in paragraph at lines 2330--2333 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][]$\T1/zi4/m/n/10 htt +ps : / / www . bioconductor . org / packages / release / bioc / html / IRanges +. html$[][]\T1/ptm/m/n/10 , +[47] [48] [49] +Overfull \hbox (4.75021pt too wide) in paragraph at lines 2469--2469 + []\T1/zi4/m/n/10 na.strings=getOption("datatable.na.strings","NA"), # due to +change to ""; see NEWS[] + +Overfull \hbox (13.08014pt too wide) in paragraph at lines 2480--2480 + []\T1/zi4/m/n/10 logical01=getOption("datatable.logical01", FALSE), # due to +change to TRUE; see NEWS[] +[50] +Overfull \hbox (78.13817pt too wide) in paragraph at lines 2493--2494 +[]\T1/ptm/m/n/10 A shell com-mand that pre-processes the file; e.g. []\T1/zi4/m +/n/10 fread(cmd=paste("grep",word,"filename"))[]\T1/ptm/m/n/10 . +[51] [52] +Overfull \hbox (20.37852pt too wide) in paragraph at lines 2518--2519 +\T1/ptm/m/n/10 is passed to [][][]\T1/zi4/m/n/10 setindexv[][][][]\T1/ptm/m/n/1 +0 . As with []\T1/zi4/m/n/10 key[]\T1/ptm/m/n/10 , comma-separated no-ta-tion l +ike []\T1/zi4/m/n/10 index="x,y,z" + +Overfull \hbox (6.06009pt too wide) in paragraph at lines 2520--2521 +\T1/ptm/m/n/10 ar-gu-ment can be changed with []\T1/zi4/m/n/10 options(datatabl +e.fread.datatable=FALSE)[]\T1/ptm/m/n/10 . + +Overfull \hbox (0.26845pt too wide) in paragraph at lines 2528--2529 +\T1/ptm/m/n/10 char-ac-ter date-times in lo-cal time-zone; e.g. by us-ing []\T1 +/zi4/m/n/10 "POSIXct" []\T1/ptm/m/n/10 in []\T1/zi4/m/n/10 colClasses=[]\T1/ptm +/m/n/10 . +[53] [54] +Overfull \hbox (31.92902pt too wide) in paragraph at lines 2560--2561 +\T1/ptm/m/n/10 up to that point in that field must be bal-anced; e.g. []\T1/zi4 +/m/n/10 ...,2,"www.blah?x="one",y="two"",3.14,...[]\T1/ptm/m/n/10 . + +Overfull \hbox (88.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 1727772 / qui +ckly-[]reading-[]very-[]large-[]tables-[]as-[]dataframes-[]in-[]r$[][] + +Overfull \hbox (64.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 415515 / how- +[]can-[]i-[]read-[]and-[]manipulate-[]csv-[]file-[]data-[]in-[]c$[][] + +Overfull \hbox (53.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9352887 / str +ategies-[]for-[]reading-[]in-[]csv-[]files-[]in-[]pieces$[][] + +Overfull \hbox (13.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 258091 / when +-[]should-[]i-[]use-[]mmap-[]for-[]file-[]access$[][] + +Overfull \hbox (47.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9608950 / rea +ding-[]huge-[]files-[]using-[]memory-[]mapped-[]files$[][] +[55] [56] +Overfull \hbox (24.75635pt too wide) in paragraph at lines 2648--2648 + []\T1/zi4/m/n/9 # TODO: add numerals=c("allow.loss", "warn.loss", "no.loss") f +rom base::read.table, +"use.Rmpfr"[] + +Underfull \vbox (badness 10000) has occurred while \output is active [57] +Overfull \hbox (27.78088pt too wide) in paragraph at lines 2752--2752 + []\T1/zi4/m/n/9 fread("https://github.com/Rdatatable/data.table/raw/1.14.0/ins +t/tests/issue_785_fread.txt.gz")[] + +Underfull \vbox (badness 10000) has occurred while \output is active [58] +[59] +Overfull \hbox (26.39984pt too wide) in paragraph at lines 2823--2823 + [] \T1/zi4/m/n/10 logical01 = getOption("datatable.logical01", FALSE), # due + to change to TRUE; see NEWS[] +[60] +Overfull \hbox (7.74875pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 Should row names be writ-ten? For com-pat-i-bil-ity with []\T1 +/zi4/m/n/10 data.frame []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 write.csv + +Overfull \hbox (1.69868pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 since []\T1/zi4/m/n/10 data.table []\T1/ptm/m/n/10 never has r +ow names. Hence de-fault []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 un-like []\T1/ +zi4/m/n/10 write.csv[]\T1/ptm/m/n/10 . + +Overfull \hbox (18.6402pt too wide) in paragraph at lines 2864--2865 +[]\T1/ptm/m/n/10 "ISO" (de-fault) - []\T1/zi4/m/n/10 2016-09-12[]\T1/ptm/m/n/10 + , []\T1/zi4/m/n/10 18:12:16 []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 2016-09-12T1 +8:12:16.999999Z[]\T1/ptm/m/n/10 . +[61] +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + + +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + +[62] +Overfull \hbox (1.54796pt too wide) in paragraph at lines 2889--2890 +[]\T1/ptm/m/n/10 To save space, []\T1/zi4/m/n/10 fwrite []\T1/ptm/m/n/10 prefer +s to write wide nu-meric val-ues in sci-en-tific no-ta-tion -- e.g. []\T1/zi4/m +/n/10 10000000000 +[63] [64] [65] +Overfull \hbox (81.78088pt too wide) in paragraph at lines 3032--3034 +[][][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / stati +c / queries-[]table-[]expressions . html # QUERIES-[]GROUPING-[]SETS$[][] + +Overfull \hbox (66.28088pt too wide) in paragraph at lines 3032--3034 +[][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / static +/ functions-[]aggregate . html # FUNCTIONS-[]GROUPING-[]TABLE$[][] +[66] +Overfull \hbox (0.75328pt too wide) in paragraph at lines 3073--3073 + []\T1/zi4/m/n/9 cube(DT, j = c(list(count=.N), lapply(.SD, sum)), by = c("colo +r","year","status"), id=TRUE)[] +[67] [68] +Overfull \hbox (0.11824pt too wide) in paragraph at lines 3261--3268 +\T1/ptm/m/n/10 month, and other date-time in-ter-vals. []\T1/zi4/m/n/10 as.POSI +Xlt []\T1/ptm/m/n/10 is also use-ful. For ex-am-ple, []\T1/zi4/m/n/10 as.POSIXl +t(x)$mon +[69] [70] [71] [72] +Overfull \hbox (0.27834pt too wide) in paragraph at lines 3500--3502 +[]\T1/ptm/m/n/10 Not ap-pli-ca-ble for []\T1/zi4/m/n/10 data.table []\T1/ptm/m/ +n/10 first/last. Any ar-gu-ments here are passed through +[73] [74] +Overfull \hbox (0.50786pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 con-ver-sion spec-i-fied as an ar-gu-ment) whereas []\T1/zi4/m/n +/10 measurev []\T1/ptm/m/n/10 al-lows spec-i-fy-ing group names/conversions + +Overfull \hbox (54.33804pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 us-ing data val-ues (each group and con-ver-sion spec-i-fied as +a list el-e-ment). See [][][]\T1/zi4/m/n/10 vignette("datatable-reshape")[][] +[75] +Overfull \hbox (14.50853pt too wide) in paragraph at lines 3693--3697 +[]\T1/zi4/m/n/10 melt []\T1/ptm/m/n/10 is []\T1/zi4/m/n/10 data.table[]\T1/ptm/ +m/n/10 's wide-to-long re-shap-ing tool. We pro-vide an S3 method for melt-ing +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s. +[76] +Overfull \hbox (1.92825pt too wide) in paragraph at lines 3724--3725 +[]\T1/ptm/m/n/10 Pattern-based col-umn match-ing can be achieved with the reg-u +-lar expression- + +Overfull \hbox (5.1285pt too wide) in paragraph at lines 3730--3731 +[]\T1/ptm/m/n/10 name (de-fault []\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 variable\TS1/ +zi4/m/n/10 '[]\T1/ptm/m/n/10 ) of out-put col-umn con-tain-ing in-for-ma-tion a +bout which +[77] [78] +Underfull \vbox (badness 10000) has occurred while \output is active [79] +Overfull \hbox (18.77168pt too wide) in paragraph at lines 3859--3859 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="(.)_(.)"))[] + +Overfull \hbox (32.27168pt too wide) in paragraph at lines 3860--3860 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="([dc])_(.)"))[] +[80] [81] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3966--3966 + []\T1/zi4/m/n/9 (dt1 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(1:3, + 2)], X = 1:6, key = c("A", "B")))[] + +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3967--3967 + []\T1/zi4/m/n/9 (dt2 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(2:4, + 2)], Y = 6:1, key = c("A", "B")))[] +[82] [83] +Overfull \hbox (47.01965pt too wide) in paragraph at lines 4110--4111 +[]\T1/ptm/m/n/10 Note that both []\T1/zi4/m/n/10 nafill []\T1/ptm/m/n/10 and [] +\T1/zi4/m/n/10 setnafill []\T1/ptm/m/n/10 pro-vide some ver-bose out-put when [ +]\T1/zi4/m/n/10 getOption(\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 datatable.verbose\TS1 +/zi4/m/n/10 '\T1/zi4/m/n/10 ) +[84] [85] +Overfull \hbox (2.03732pt too wide) in paragraph at lines 4235--4236 +[]\T1/ptm/m/n/10 Key en-hance-ments in-clude au-to-matic out-put com-pres-sion +of many ob-ser-va-tions and con-cise column- +[86] [87] [88] +Underfull \vbox (badness 10000) has occurred while \output is active [89] +[90] [91] [92] +Overfull \hbox (11.06816pt too wide) in paragraph at lines 4549--4550 +[]\T1/ptm/m/n/10 Character, spec-i-fy-ing the "align-ment" of the rolling win-d +ow, de-fault-ing to []\T1/zi4/m/n/10 "right"[]\T1/ptm/m/n/10 . +[93] +Overfull \hbox (27.54721pt too wide) in paragraph at lines 4567--4571 +[]\T1/ptm/m/n/10 Argument []\T1/zi4/m/n/10 n []\T1/ptm/m/n/10 al-lows mul-ti-pl +e val-ues to ap-ply rolling func-tions on mul-ti-ple win-dow sizes. If []\T1/zi +4/m/n/10 adaptive=TRUE[]\T1/ptm/m/n/10 , +[94] +Overfull \hbox (25.75847pt too wide) in paragraph at lines 4634--4637 +[]\T1/zi4/m/n/10 partial []\T1/ptm/m/n/10 win-dow fea-ture is not sup-ported, a +l-though it can be ac-com-plished by us-ing []\T1/zi4/m/n/10 adaptive=TRUE[]\T1 +/ptm/m/n/10 , +[95] +Underfull \vbox (badness 10000) has occurred while \output is active [96] +[97] [98] [99] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 4893--4893 + []\T1/zi4/m/n/9 setnames(DT, old, new, skip_absent = TRUE) # skips old[3] beca +use "c" is not a column name of DT[] + +Overfull \hbox (14.24408pt too wide) in paragraph at lines 4909--4909 + []\T1/zi4/m/n/9 setnames(DT,c("a","E"),c("A","F")) # multiple by name (warning + if either "a" or "E" is missing)[] +[100] +Overfull \hbox (1.12917pt too wide) in paragraph at lines 4953--4954 +[]\T1/ptm/m/n/10 If one of them (not both) was pro-vided with a col-umn name or + num-ber, []\T1/zi4/m/n/10 neworder +[101] [102] [103] [104] +Overfull \hbox (33.06992pt too wide) in paragraph at lines 5122--5122 + [] \T1/zi4/m/n/10 setDTthreads(threads = NULL, restore_after_fork = NULL, per +cent = NULL, throttle = NULL) +[105] +Overfull \hbox (83.5179pt too wide) in paragraph at lines 5144--5145 +\T1/ptm/m/n/10 cur-rent num-ber of threads data.table is us-ing. For ex-am-ple, + the en-vi-ron-ment vari-able []\T1/zi4/m/n/10 R_DATATABLE_NUM_PROCS_PERCENT + +Overfull \hbox (2.44835pt too wide) in paragraph at lines 5148--5149 +[]\T1/zi4/m/n/10 OMP_THREAD_LIMIT []\T1/ptm/m/n/10 to 2, so de-vel-op-ers of CR +AN pack-ages should never change []\T1/zi4/m/n/10 OMP_THREAD_LIMIT +[106] [107] +Overfull \hbox (9.36925pt too wide) in paragraph at lines 5273--5278 +\T1/ptm/m/n/10 ments; e.g., []\T1/zi4/m/n/10 setkey(DT,a)[.("foo")][]\T1/ptm/m/ +n/10 . If you re-quire a copy, take a copy first (us-ing []\T1/zi4/m/n/10 DT2=c +opy(DT)[]\T1/ptm/m/n/10 ). +[108] +Overfull \hbox (9.02112pt too wide) in paragraph at lines 5309--5314 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 ta +bles[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 sort.list[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][][ +]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 set[][][] [] +[]:=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[][][][]\T1/ptm/m/n/1 +0 , [][][]\T1/zi4/m/n/10 setcolorder[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 setattr[][][][]\T1/ptm/m/n/10 , +[109] [110] +Overfull \hbox (5.52832pt too wide) in paragraph at lines 5451--5452 +\T1/ptm/m/n/10 Ad-di-tional []\T1/zi4/m/n/10 all []\T1/ptm/m/n/10 ar-gu-ment co +n-trols how du-pli-cated rows are han-dled. Func-tions []\T1/zi4/m/n/10 finters +ect[]\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 setdiff +[111] +Overfull \hbox (6.781pt too wide) in paragraph at lines 5493--5494 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 rb +indlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 all.equal.data.table[][][] +[]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T +1/zi4/m/n/10 duplicated[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 uniqueN[][ +][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 anyDuplicated[][][] +[112] [113] +Overfull \hbox (19.21956pt too wide) in paragraph at lines 5562--5566 +\T1/zi4/m/n/10 na.last)] []\T1/ptm/m/n/10 and its de-fault is []\T1/zi4/m/n/10 +TRUE[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 and []\T1/zi4 +/m/n/10 setorderv []\T1/ptm/m/n/10 only ac-cept []\T1/zi4/m/n/10 TRUE[]\T1/ptm/ +m/n/10 /[]\T1/zi4/m/n/10 FALSE + +Overfull \hbox (21.31844pt too wide) in paragraph at lines 5588--5594 +[]\T1/zi4/m/n/10 na.last []\T1/ptm/m/n/10 ar-gu-ment, by de-fault, is []\T1/zi4 +/m/n/10 FALSE []\T1/ptm/m/n/10 for []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 a +nd []\T1/zi4/m/n/10 setorderv []\T1/ptm/m/n/10 to be con-sis-tent with []\T1/zi +4/m/n/10 data.table[]\T1/ptm/m/n/10 's +[114] +Overfull \hbox (34.28088pt too wide) in paragraph at lines 5625--5630 +[][]$\T1/zi4/m/n/10 https : / / medium . com / basecs / getting-[]to-[]the-[]ro +ot-[]of-[]sorting-[]with-[]radix-[]sort-[]f8e9240d4224$[][] +[115] +Overfull \hbox (1.8694pt too wide) in paragraph at lines 5675--5676 +\T1/ptm/m/n/10 "for-wards"), []\T1/zi4/m/n/10 "shift" []\T1/ptm/m/n/10 (be-have + same as []\T1/zi4/m/n/10 "lag" []\T1/ptm/m/n/10 ex-cept given names) and []\T1 +/zi4/m/n/10 "cyclic" +[116] [117] +Underfull \hbox (badness 10000) in paragraph at lines 5779--5781 + +[118] +Overfull \hbox (17.0685pt too wide) in paragraph at lines 5816--5817 +\T1/ptm/m/n/10 the group, its row lo-ca-tion in []\T1/zi4/m/n/10 x[]\T1/ptm/m/n +/10 . This is use-ful to sub-set in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 ; e.g. [ +]\T1/zi4/m/n/10 DT[, .I[which.max(somecol)], + +Overfull \hbox (23.26248pt too wide) in paragraph at lines 5838--5838 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1) +[119] +Overfull \hbox (1.83873pt too wide) in paragraph at lines 5895--5896 +[]\T1/ptm/m/n/10 character vec-tor. Col-umn names on which split should be made +. For []\T1/zi4/m/n/10 length(by) +[120] [121] [122] +Overfull \hbox (19.7582pt too wide) in paragraph at lines 6069--6070 +\T1/ptm/m/n/10 tracker. For the present mo-ment there is an op-tion to dis-able + that: []\T1/zi4/m/n/10 options(datatable.enlist=FALSE)[]\T1/ptm/m/n/10 . +[123] [124] +Overfull \hbox (5.3492pt too wide) in paragraph at lines 6147--6148 +[]\T1/ptm/m/n/10 Usually []\T1/zi4/m/n/10 tables() []\T1/ptm/m/n/10 is ex-e-cut +ed at the prompt, where []\T1/zi4/m/n/10 parent.frame() []\T1/ptm/m/n/10 re-tur +ns []\T1/zi4/m/n/10 .GlobalEnv[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 tables() +[125] +Overfull \hbox (0.35852pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 If you are test-ing the print-ing/console out-put be-haviour; +e.g. with []\T1/zi4/m/n/10 verbose=TRUE + +Overfull \hbox (4.27966pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 options(datatable.verbose=TRUE)[]\T1/ptm/m +/n/10 . Again, regex-compatible and case sen- +[126] [127] [128] +Overfull \hbox (10.83717pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 If all tests were suc-cess-ful, []\T1/zi4/m/n/10 TRUE []\T1/pt +m/m/n/10 is re-turned. Oth-er-wise, see the []\T1/zi4/m/n/10 silent []\T1/ptm/m +/n/10 ar-gu-ment above. []\T1/zi4/m/n/10 silent=TRUE + +Overfull \hbox (19.6285pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 is in-tended for use at the start of pro-duc-tion scripts; e.g +. []\T1/zi4/m/n/10 stopifnot(test.data.table(silent=TRUE)) +[129] [130] +Overfull \hbox (26.22261pt too wide) in paragraph at lines 6393--6393 + []\T1/zi4/m/n/9 DT = DT[, transform(.SD, d=max(b)), by="c"] # same, but even + worse as .SD is copied for each group[] +[131] [132] +Overfull \hbox (17.35712pt too wide) in paragraph at lines 6511--6512 +\T1/ptm/m/n/10 in use. Cur-rently, it is just the list vec-tor of col-umn point +-ers that is over-allocated (i.e. []\T1/zi4/m/n/10 truelength(DT)[]\T1/ptm/m/n/ +10 ), +[133] [134] [135] +Overfull \hbox (12.75021pt too wide) in paragraph at lines 6607--6607 + []\T1/zi4/m/n/9 # convert the remaining using \TS1/zi4/m/n/9 '\T1/zi4/m/n/9 ty +pe.convert(x, as.is=TRUE)\TS1/zi4/m/n/9 ' \T1/zi4/m/n/9 (i.e. what type.convert +=TRUE does)[] + +Overfull \hbox (26.25941pt too wide) in paragraph at lines 6608--6608 + []\T1/zi4/m/n/9 DT[, tstrsplit(v, " ", type.convert=list(as.IDate=4L, function +(x) type.convert(x, as.is=TRUE)))][] + +Overfull \hbox (48.92793pt too wide) in paragraph at lines 6650--6653 +[]\T1/ptm/m/n/10 By de-fault the func-tion uses our GitLab-hosted R repos-i-tor +y at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data.table[]\T1/ptm/m/n/10 . + + +Overfull \hbox (144.81755pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 We also pub-lish bleed-ing edge ver-sion of the pack-age on GitH +ub-hosted R repos-i-tory at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data. +table + +Overfull \hbox (66.05753pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 There are also other repos-i-to-ries main-tained by R com-mu-nit +y, for ex-am-ple []\T1/zi4/m/n/10 https://rdatatable.r-universe.dev[]\T1/ptm/m/ +n/10 . +[136] +No file Rd2.ind. +[137] (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.aux) + +Package rerunfilecheck Warning: File `Rd2.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + + ) +(see the transcript file for additional information) +pdfTeX warning (dest): name{Rfn.install.packages} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.type.convert} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.try} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.unsetenv} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.object.size} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.objects} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.ls} has been referenced but does not exist, rep +laced by a fixed one + + +pdfTeX warning (dest): name{Rfn.eval} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.name} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.call} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.split.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort.list} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.mean} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.rle} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.print.default} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.getS3method} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.grep} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.merge.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::grepl} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tail} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.head} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.NROW} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.DateTimeClasses} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.strptime} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.POSIXct} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.Date} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.round} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.table} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.csv} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.options} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.yaml} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.setlocale} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.url} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.system} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tempdir} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.download.file} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::write.csv} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::tempdir} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.yaml.load} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.make.names} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::read.csv} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.path.expand} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.POSIXct} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.delim\(\)} has been referenced but does no +t exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv\(\)} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.storage.mode} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.unique.data.frame} has been referenced but does + not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn..Rpcent.in.Rpcent.} has been referenced but doe +s not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.match} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.charmatch} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.array} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.matrix} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.format} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.vector} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.integer64} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.is.numeric} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.bquote} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.[.data.frame} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.frame} has been referenced but does not ex +ist, replaced by a fixed one + + +Output written on Rd2.pdf (137 pages, 458032 bytes). +Transcript written on Rd2.log. +This is makeindex, version 2.17 [TeX Live 2023] (kpathsea + Thai support). +Scanning input file Rd2.idx....done (673 entries accepted, 6 rejected). +Sorting entries........done (6763 comparisons). +Generating output file Rd2.ind....done (790 lines written, 4 warnings). +Output written in Rd2.ind. +Transcript written in Rd2.ilg. +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) + restricted \write18 enabled. +entering extended mode +LaTeX2e <2023-11-01> patch level 1 +L3 programming layer <2024-01-22> +(./Rd2.tex +(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls +Document Class: book 2023/05/17 v1.4n Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo)) +(/usr/share/R/share/texmf/tex/latex/Rd.sty +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/bm.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/verbatim.sty) +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/mathrsfs.sty) +(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/zi4.sty +`inconsolata-zi4' v1.12, 2019/05/17 Text macros for Inconsolata (msharpe) +(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty +(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) +(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) +(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) +(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def) +(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))) +(/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty) +Writing index file Rd2.idx +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd) +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.aux) +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +) (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.out) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.out) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/t1zi4.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/ursfs.fd) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.toc [1{/var/lib/texmf/fonts/map/pdftex +/updmap/pdftex.map}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}{ +/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}{/usr/share/texlive/ +texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-0.enc}] [2]) +Overfull \hbox (43.10059pt too wide) in paragraph at lines 63--63 + []\T1/zi4/m/n/10 data.table(..., keep.rownames=FALSE, check.names=FALSE, key=N +ULL, stringsAsFactors=FALSE) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/ts1zi4.fd) [3{/usr/share/t +exlive/texmf-dist/fonts/enc/dvips/inconsolata/i4-ts1.enc}] +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd) +Overfull \hbox (57.41945pt too wide) in paragraph at lines 114--115 +[]\T1/ptm/m/n/10 This is sum-marised in code as []\T1/zi4/m/n/10 min(length(key +(x)), if (haskey(i)) length(key(i)) + +Overfull \hbox (194.1307pt too wide) in paragraph at lines 124--125 +[]\T1/ptm/m/n/10 See [][][]\T1/zi4/m/n/10 vignette("datatable-keys-fast-subset" +)[][] []\T1/ptm/m/n/10 and [][][]\T1/zi4/m/n/10 vignette("datatable-secondary-i +ndices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Overfull \hbox (3.91003pt too wide) in paragraph at lines 129--130 +[]\T1/zi4/m/n/10 x$a []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 sum(x$a) []\T1/ptm/m +/n/10 as a vec-tor re-spec-tively. []\T1/zi4/m/n/10 x[, .(a, b)] []\T1/ptm/m/n/ +10 and []\T1/zi4/m/n/10 x[, .(sa=sum(a), +[4] +Overfull \hbox (34.84958pt too wide) in paragraph at lines 151--152 +[]\T1/ptm/m/n/10 a []\T1/zi4/m/n/10 list() []\T1/ptm/m/n/10 of ex-pres-sions of + col-umn names: e.g., []\T1/zi4/m/n/10 DT[, .(sa=sum(a)), by=.(x=x>0, + +Overfull \hbox (20.64027pt too wide) in paragraph at lines 162--163 +[]\T1/ptm/m/it/10 Advanced: \T1/ptm/m/n/10 When []\T1/zi4/m/n/10 i []\T1/ptm/m/ +n/10 is a []\T1/zi4/m/n/10 list []\T1/ptm/m/n/10 (or []\T1/zi4/m/n/10 data.fram +e []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 ), []\T1/zi4/ +m/n/10 DT[i, j, by=.EACHI] +[5] +Overfull \hbox (11.38815pt too wide) in paragraph at lines 181--182 +[]\T1/zi4/m/n/10 -Inf []\T1/ptm/m/n/10 rolls back-wards in-stead; i.e., next ob +-ser-va-tion car-ried back-ward (NOCB). +[6] +Overfull \hbox (2.54861pt too wide) in paragraph at lines 207--208 +[]\T1/ptm/m/n/10 Inversion (col-umn drop-ping in-stead of keep-ing) can be ac-c +om-plished be prepend- + +Overfull \hbox (33.29951pt too wide) in paragraph at lines 209--210 +\T1/ptm/m/n/10 also in-vert a pat-tern as usual with []\T1/zi4/m/n/10 .SDcols=! +patterns(...) []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 .SDcols=!is.numeric[]\T1/ptm +/m/n/10 . +[7] +Overfull \hbox (64.98978pt too wide) in paragraph at lines 234--235 +[]\T1/ptm/m/n/10 See ex-am-ples as well as [][][]\T1/zi4/m/n/10 vignette("datat +able-secondary-indices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Underfull \hbox (badness 10000) in paragraph at lines 244--245 + + +Underfull \hbox (badness 10000) in paragraph at lines 254--255 + + +Overfull \hbox (56.30783pt too wide) in paragraph at lines 268--268 + [] \T1/zi4/m/n/10 X[, a] # return col \TS1/zi4/m/n/10 +'\T1/zi4/m/n/10 a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 from X as vector. If not foun +d, search in parent frame.[] + +Overfull \hbox (19.66843pt too wide) in paragraph at lines 270--270 + [] \T1/zi4/m/n/10 X[, sum(a)] # return sum(a) as a vector ( +with same scoping rules as above)[] + +Overfull \hbox (129.66843pt too wide) in paragraph at lines 272--272 + [] \T1/zi4/m/n/10 X[, sum(a), by=c] # same as above, .() can be o +mitted in j and by on single expression for convenience[] + +Overfull \hbox (93.0188pt too wide) in paragraph at lines 273--273 + [] \T1/zi4/m/n/10 X[, sum(a), by=c:f] # get sum(a) grouped by all c +olumns in between \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 f\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (bot +h inclusive)[] + +Overfull \hbox (98.0188pt too wide) in paragraph at lines 275--275 + [] \T1/zi4/m/n/10 X[, sum(a), keyby=b] # get sum(a) grouped by \TS1/ +zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , and sort that res +ult by the grouping column \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '[] + + +Overfull \hbox (33.0597pt too wide) in paragraph at lines 277--277 + [] \T1/zi4/m/n/10 X[, sum(a), by=b][order(b)] # same order as above, but by + chaining compound expressions[] + +Overfull \hbox (86.34872pt too wide) in paragraph at lines 278--278 + [] \T1/zi4/m/n/10 X[c>1, sum(a), by=c] # get rows where c>1 is TRUE, + and on those rows, get sum(a) grouped by \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1 +/zi4/m/n/10 '[] + +Overfull \hbox (106.34872pt too wide) in paragraph at lines 279--279 + [] \T1/zi4/m/n/10 X[Y, .(a, b), on="c"] # get rows where Y$c == X$c, +and select columns \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4 +/m/n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$b\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 + for those rows[] + +Overfull \hbox (58.02902pt too wide) in paragraph at lines 280--280 + [] \T1/zi4/m/n/10 X[Y, .(a, i.a), on="c"] # get rows where Y$c == X$c, +and then select \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 Y$a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (= +i.a)[] + +Overfull \hbox (74.71954pt too wide) in paragraph at lines 281--281 + [] \T1/zi4/m/n/10 X[Y, sum(a*i.a), on="c", by=.EACHI] # for *each* \TS1/zi4 +/m/n/10 '\T1/zi4/m/n/10 Y$c\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , get sum(a*i.a) on +matching rows in \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$c\TS1/zi4/m/n/10 '[] + +Overfull \hbox (104.68887pt too wide) in paragraph at lines 283--283 + [] \T1/zi4/m/n/10 X[, plot(a, b), by=c] # j accepts any expression, g +enerates plot for each group and returns no data[] +[8] +Overfull \hbox (53.0597pt too wide) in paragraph at lines 284--284 + [] \T1/zi4/m/n/10 # see ?assign to add/update/delete columns by reference u +sing the same consistent interface[] + +Overfull \hbox (21.24829pt too wide) in paragraph at lines 304--306 +\T1/ptm/m/n/10 umn called []\T1/zi4/m/n/10 keep []\T1/ptm/m/n/10 con-tain-ing [ +]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 and this is cor-rect be-haviour; []\T1/zi +4/m/n/10 data.table(DF, keep.rownames=TRUE) + +Overfull \hbox (8.80103pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 special-symbols[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 data.frame[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 [.data.frame[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 as.data.table[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 setkey[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[ +][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][] +[]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (3.08105pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 SJ[][][][]\ +T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 tables[][][ +][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 test.data.table[][][][]\T1/ptm/m/n/10 +, [][][]\T1/zi4/m/n/10 IDateTime[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 u +nique.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[][][][]\T1/p +tm/m/n/10 , + +Overfull \hbox (14.401pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setallocco +l[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 + , [][][]\T1/zi4/m/n/10 rbindlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 +setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 datatable-optim +ize[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][][][]\T1/ptm/m/n/10 + , +[9] +Overfull \hbox (3.6858pt too wide) in paragraph at lines 379--379 + []\T1/zi4/m/n/9 DT[x=="a"] # same, single "==" internally +optimised to use binary search (fast)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [10] +Underfull \vbox (badness 10000) has occurred while \output is active [11] +Overfull \hbox (23.26248pt too wide) in paragraph at lines 483--483 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [12] +[13] (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmtt.fd) +(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmtt.fd) [14] +Overfull \hbox (306.25671pt too wide) in paragraph at lines 632--632 + [] \T1/zi4/m/n/10 DT[, col := val] # update (o +r add at the end if doesn\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 t exist) a column call +ed "col" with value "val" (recycled if necessary).[] + +Overfull \hbox (221.26694pt too wide) in paragraph at lines 633--633 + [] \T1/zi4/m/n/10 DT[i, col := val] # same as a +bove, but only for those rows specified in i and (for new columns) NA elsewhere +.[] + +Overfull \hbox (419.58664pt too wide) in paragraph at lines 635--635 + [] \T1/zi4/m/n/10 DT[i, (3:6) := val] # update ex +isting columns 3:6 with value. Aside: parens are not required here since : alre +ady makes LHS a call rather than a symbol.[] + +Overfull \hbox (218.00858pt too wide) in paragraph at lines 636--636 + [] \T1/zi4/m/n/10 DT[i, colvector := val, with = FALSE] # OLD synta +x. The contents of "colvector" in calling scope determine the column(s).[] +[15] +Overfull \hbox (356.28738pt too wide) in paragraph at lines 637--637 + [] \T1/zi4/m/n/10 DT[i, (colvector) := val] # same (NOW + PREFERRED) shorthand syntax. The parens are enough to stop the LHS being a sym +bol; same as c(colvector).[] + +Overfull \hbox (226.82571pt too wide) in paragraph at lines 638--638 + [] \T1/zi4/m/n/10 DT[i, colC := mean(colB), by = colA] # update (o +r add) column called "colC" by reference by group. A major feature of \TS1/cmtt +/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 .[] + +Overfull \hbox (73.49579pt too wide) in paragraph at lines 654--654 + [] \T1/zi4/m/n/10 DT[, {col1 := 1L; col2 := 2L}] # Use the f +unctional form, \TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/ +n/10 (), instead (see above).[] + +Overfull \hbox (21.07907pt too wide) in paragraph at lines 660--661 +\T1/ptm/m/n/10 rea-son why []\T1/zi4/m/n/10 := []\T1/ptm/m/n/10 has been im-ple +-mented in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 . Please see [][][]\T1/zi4/m/n/10 + vignette("datatable-reference-semantics")[][] +[16] [17] +Overfull \hbox (9.73488pt too wide) in paragraph at lines 765--765 + []\T1/zi4/m/n/9 # However, normally, we call [.data.table *once* on *large* da +ta, not many times on small data.[] + +Underfull \vbox (badness 10000) has occurred while \output is active [18] +Overfull \hbox (71.21884pt too wide) in paragraph at lines 802--803 +[][][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / a / 10913296 / 403310$[ +][] \T1/ptm/m/n/10 (but im-ple-mented in C with-out us-ing []\T1/zi4/m/n/10 .In +ternal(inspect())[]\T1/ptm/m/n/10 ) +[19] +Overfull \hbox (34.76044pt too wide) in paragraph at lines 827--827 + [] \T1/zi4/m/n/10 ignore.col.order=FALSE, ignore.row.order=FALSE, tolerance +=sqrt(.Machine$double.eps),[] + +Overfull \hbox (11.40001pt too wide) in paragraph at lines 835--837 +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s to com-pare. If []\T1/zi4/m/n/10 +current []\T1/ptm/m/n/10 is not a []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 , + but []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (4.11882pt too wide) in paragraph at lines 840--842 +\T1/ptm/m/n/10 are fac-tors be-fore run-ning equal-ity check. It ef-fect only w +hen []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (71.63823pt too wide) in paragraph at lines 845--846 +\T1/ptm/m/n/10 data.table but also at-tributes of the columns. It will skip []\ +T1/zi4/m/n/10 c("row.names",".internal.selfref") + +Overfull \hbox (79.65813pt too wide) in paragraph at lines 857--858 +[]\T1/ptm/m/n/10 A nu-meric value used when com-par-ing nu-meric columns, by de +-fault []\T1/zi4/m/n/10 sqrt(.Machine$double.eps)[]\T1/ptm/m/n/10 . +[20] [21] +Overfull \hbox (15.57816pt too wide) in paragraph at lines 976--977 +[]\T1/zi4/m/n/10 keep.rownames []\T1/ptm/m/n/10 ar-gu-ment can be used to pre-s +erve the (row)names at-tribute in the re-sult-ing []\T1/zi4/m/n/10 data.table[] +\T1/ptm/m/n/10 . + +Overfull \hbox (26.40112pt too wide) in paragraph at lines 980--981 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 se +tDT[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , +[][][]\T1/zi4/m/n/10 copy[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setkey[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 SJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m +/n/10 , [][][]\T1/zi4/m/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setalloccol[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 , +[22] [23] [24] +Overfull \hbox (0.76248pt too wide) in paragraph at lines 1160--1160 + [] \T1/zi4/m/n/9 sample.dt <- data.table(date = as.Date((Sys.Date()-999):Sys. +Date(),origin="1970-01-01"),[] +[25] +Overfull \hbox (5.00627pt too wide) in paragraph at lines 1201--1204 +[]\T1/ptm/m/n/10 Any or-der-able vec-tor, i.e., those with rel-e-vant meth-ods +for []\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 <=\TS1/cmtt/m/n/10 `[]\T1/ptm/m/n/10 , s +uch as []\T1/zi4/m/n/10 numeric[]\T1/ptm/m/n/10 , + +Overfull \hbox (3.46771pt too wide) in paragraph at lines 1208--1211 +[]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 means in-clu-sive bounds, i.e., [lower,u +pper]. []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 means ex-clu-sive bounds, +[26] [27] +Overfull \hbox (89.73999pt too wide) in paragraph at lines 1278--1278 + [] \T1/zi4/m/n/10 Rcpp::cppFunction("SEXP mysub2(SEXP x, SEXP rows, SEXP cols +) { return DT_subsetDT(x,rows,cols); }",[] +[28] +Overfull \hbox (7.58745pt too wide) in paragraph at lines 1330--1331 +[]\T1/ptm/m/n/10 It may be pos-si-ble to speed up fast-match's hash ta-ble buil +d time by us-ing the tech-nique in []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 +, +[29] +Overfull \hbox (9.87895pt too wide) in paragraph at lines 1402--1403 +[]\T1/ptm/m/n/10 A []\T1/zi4/m/n/10 copy() []\T1/ptm/m/n/10 may be re-quired wh +en do-ing []\T1/zi4/m/n/10 dt_names = names(DT)[]\T1/ptm/m/n/10 . Due to R's \T +1/ptm/m/it/10 copy-on-modify\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 dt_names +[30] [31] +Overfull \hbox (12.18959pt too wide) in paragraph at lines 1508--1511 +[]\T1/ptm/m/n/10 The ex-pres-sion []\T1/zi4/m/n/10 DT[, lapply(.SD, fun), by=.] + []\T1/ptm/m/n/10 gets op-ti-mised to []\T1/zi4/m/n/10 DT[, list(fun(a), fun(b) +, +[32] [33] +Underfull \vbox (badness 10000) has occurred while \output is active [34] +[35] +Overfull \hbox (58.2086pt too wide) in paragraph at lines 1702--1703 +[]\T1/ptm/m/n/10 logical; []\T1/zi4/m/n/10 value.var.in.dots = TRUE []\T1/ptm/m +/n/10 is short-hand to save set-ting both []\T1/zi4/m/n/10 value.var.in.LHSdots + + +Overfull \hbox (10.00912pt too wide) in paragraph at lines 1709--1710 +\T1/ptm/m/n/10 vari-ables not oth-er-wise men-tioned in []\T1/zi4/m/n/10 formul +a[]\T1/ptm/m/n/10 , and []\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 de-pend-ing + on []\T1/zi4/m/n/10 value.var.in.LHSdots +[36] +Overfull \hbox (7.89836pt too wide) in paragraph at lines 1725--1726 +[]\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 is a char-ac-ter vec-tor or a list +of length one, each func-tion men-tioned un-der []\T1/zi4/m/n/10 fun.aggregate + +Overfull \hbox (7.31819pt too wide) in paragraph at lines 1727--1728 +[]\T1/ptm/m/n/10 Historical note: []\T1/zi4/m/n/10 dcast.data.table []\T1/ptm/m +/n/10 was orig-i-nally de-signed as an en-hance-ment to []\T1/zi4/m/n/10 reshap +e2::dcast +[37] +Overfull \hbox (15.71954pt too wide) in paragraph at lines 1761--1761 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=FALSE) # all missing combinations + of LHS and RHS[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1762--1762 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(FALSE, TRUE)) # all missing combinations + of LHS only[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1763--1763 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(TRUE, FALSE)) # all missing combinations + of RHS only[] + +Overfull \hbox (26.25021pt too wide) in paragraph at lines 1771--1771 + []\T1/zi4/m/n/9 dcast(DT, ... ~ v3, value.var="v4", value.var.in.dots=TRUE) # +same as v1+v2+v4~v3, value.var="v4"[] +[38] [39] +Overfull \hbox (23.92102pt too wide) in paragraph at lines 1892--1896 +[][][]\T1/zi4/m/n/10 setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 duplicated[][][][ +]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 all.equal[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][] +[][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 funion[][][][]\T1/ptm/m/n/10 , [][][] +\T1/zi4/m/n/10 fintersect[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (8.25941pt too wide) in paragraph at lines 1928--1928 + []\T1/zi4/m/n/9 unique(DT, by="B", fromLast=FALSE) # equivalent: DT[!duplicate +d(DT, by="B", fromLast=FALSE)][] +[40] [41] [42] [43] [44] [45] +Overfull \hbox (11.16714pt too wide) in paragraph at lines 2209--2212 +[]\T1/ptm/m/n/10 Usually, []\T1/zi4/m/n/10 x []\T1/ptm/m/n/10 is a very large d +ata.table with small in-ter-val ranges, and []\T1/zi4/m/n/10 y []\T1/ptm/m/n/10 + is much smaller \T1/ptm/m/it/10 keyed []\T1/zi4/m/n/10 data.table +[46] +Overfull \hbox (1.54832pt too wide) in paragraph at lines 2252--2262 +[]\T1/ptm/m/n/10 The types shown here are iden-ti-cal in func-tion-al-ity to th +e func-tion []\T1/zi4/m/n/10 findOverlaps +[47] +Overfull \hbox (1.8009pt too wide) in paragraph at lines 2330--2333 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][]$\T1/zi4/m/n/10 htt +ps : / / www . bioconductor . org / packages / release / bioc / html / IRanges +. html$[][]\T1/ptm/m/n/10 , +[48] [49] [50] +Overfull \hbox (4.75021pt too wide) in paragraph at lines 2469--2469 + []\T1/zi4/m/n/10 na.strings=getOption("datatable.na.strings","NA"), # due to +change to ""; see NEWS[] + +Overfull \hbox (13.08014pt too wide) in paragraph at lines 2480--2480 + []\T1/zi4/m/n/10 logical01=getOption("datatable.logical01", FALSE), # due to +change to TRUE; see NEWS[] +[51] +Overfull \hbox (78.13817pt too wide) in paragraph at lines 2493--2494 +[]\T1/ptm/m/n/10 A shell com-mand that pre-processes the file; e.g. []\T1/zi4/m +/n/10 fread(cmd=paste("grep",word,"filename"))[]\T1/ptm/m/n/10 . +[52] [53] +Overfull \hbox (20.37852pt too wide) in paragraph at lines 2518--2519 +\T1/ptm/m/n/10 is passed to [][][]\T1/zi4/m/n/10 setindexv[][][][]\T1/ptm/m/n/1 +0 . As with []\T1/zi4/m/n/10 key[]\T1/ptm/m/n/10 , comma-separated no-ta-tion l +ike []\T1/zi4/m/n/10 index="x,y,z" + +Overfull \hbox (6.06009pt too wide) in paragraph at lines 2520--2521 +\T1/ptm/m/n/10 ar-gu-ment can be changed with []\T1/zi4/m/n/10 options(datatabl +e.fread.datatable=FALSE)[]\T1/ptm/m/n/10 . + +Overfull \hbox (0.26845pt too wide) in paragraph at lines 2528--2529 +\T1/ptm/m/n/10 char-ac-ter date-times in lo-cal time-zone; e.g. by us-ing []\T1 +/zi4/m/n/10 "POSIXct" []\T1/ptm/m/n/10 in []\T1/zi4/m/n/10 colClasses=[]\T1/ptm +/m/n/10 . +[54] [55] +Overfull \hbox (31.92902pt too wide) in paragraph at lines 2560--2561 +\T1/ptm/m/n/10 up to that point in that field must be bal-anced; e.g. []\T1/zi4 +/m/n/10 ...,2,"www.blah?x="one",y="two"",3.14,...[]\T1/ptm/m/n/10 . + +Overfull \hbox (88.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 1727772 / qui +ckly-[]reading-[]very-[]large-[]tables-[]as-[]dataframes-[]in-[]r$[][] + +Overfull \hbox (64.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 415515 / how- +[]can-[]i-[]read-[]and-[]manipulate-[]csv-[]file-[]data-[]in-[]c$[][] + +Overfull \hbox (53.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9352887 / str +ategies-[]for-[]reading-[]in-[]csv-[]files-[]in-[]pieces$[][] + +Overfull \hbox (13.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 258091 / when +-[]should-[]i-[]use-[]mmap-[]for-[]file-[]access$[][] + +Overfull \hbox (47.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9608950 / rea +ding-[]huge-[]files-[]using-[]memory-[]mapped-[]files$[][] +[56] [57] +Overfull \hbox (24.75635pt too wide) in paragraph at lines 2648--2648 + []\T1/zi4/m/n/9 # TODO: add numerals=c("allow.loss", "warn.loss", "no.loss") f +rom base::read.table, +"use.Rmpfr"[] + +Underfull \vbox (badness 10000) has occurred while \output is active [58] +Overfull \hbox (27.78088pt too wide) in paragraph at lines 2752--2752 + []\T1/zi4/m/n/9 fread("https://github.com/Rdatatable/data.table/raw/1.14.0/ins +t/tests/issue_785_fread.txt.gz")[] + +Underfull \vbox (badness 10000) has occurred while \output is active [59] +[60] +Overfull \hbox (26.39984pt too wide) in paragraph at lines 2823--2823 + [] \T1/zi4/m/n/10 logical01 = getOption("datatable.logical01", FALSE), # due + to change to TRUE; see NEWS[] +[61] +Overfull \hbox (7.74875pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 Should row names be writ-ten? For com-pat-i-bil-ity with []\T1 +/zi4/m/n/10 data.frame []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 write.csv + +Overfull \hbox (1.69868pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 since []\T1/zi4/m/n/10 data.table []\T1/ptm/m/n/10 never has r +ow names. Hence de-fault []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 un-like []\T1/ +zi4/m/n/10 write.csv[]\T1/ptm/m/n/10 . + +Overfull \hbox (18.6402pt too wide) in paragraph at lines 2864--2865 +[]\T1/ptm/m/n/10 "ISO" (de-fault) - []\T1/zi4/m/n/10 2016-09-12[]\T1/ptm/m/n/10 + , []\T1/zi4/m/n/10 18:12:16 []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 2016-09-12T1 +8:12:16.999999Z[]\T1/ptm/m/n/10 . +[62] +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + + +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + +[63] +Overfull \hbox (1.54796pt too wide) in paragraph at lines 2889--2890 +[]\T1/ptm/m/n/10 To save space, []\T1/zi4/m/n/10 fwrite []\T1/ptm/m/n/10 prefer +s to write wide nu-meric val-ues in sci-en-tific no-ta-tion -- e.g. []\T1/zi4/m +/n/10 10000000000 +[64] [65] [66] +Overfull \hbox (81.78088pt too wide) in paragraph at lines 3032--3034 +[][][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / stati +c / queries-[]table-[]expressions . html # QUERIES-[]GROUPING-[]SETS$[][] + +Overfull \hbox (66.28088pt too wide) in paragraph at lines 3032--3034 +[][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / static +/ functions-[]aggregate . html # FUNCTIONS-[]GROUPING-[]TABLE$[][] +[67] +Overfull \hbox (0.75328pt too wide) in paragraph at lines 3073--3073 + []\T1/zi4/m/n/9 cube(DT, j = c(list(count=.N), lapply(.SD, sum)), by = c("colo +r","year","status"), id=TRUE)[] +[68] [69] +Overfull \hbox (0.11824pt too wide) in paragraph at lines 3261--3268 +\T1/ptm/m/n/10 month, and other date-time in-ter-vals. []\T1/zi4/m/n/10 as.POSI +Xlt []\T1/ptm/m/n/10 is also use-ful. For ex-am-ple, []\T1/zi4/m/n/10 as.POSIXl +t(x)$mon +[70] [71] [72] [73] +Overfull \hbox (0.27834pt too wide) in paragraph at lines 3500--3502 +[]\T1/ptm/m/n/10 Not ap-pli-ca-ble for []\T1/zi4/m/n/10 data.table []\T1/ptm/m/ +n/10 first/last. Any ar-gu-ments here are passed through +[74] [75] +Overfull \hbox (0.50786pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 con-ver-sion spec-i-fied as an ar-gu-ment) whereas []\T1/zi4/m/n +/10 measurev []\T1/ptm/m/n/10 al-lows spec-i-fy-ing group names/conversions + +Overfull \hbox (54.33804pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 us-ing data val-ues (each group and con-ver-sion spec-i-fied as +a list el-e-ment). See [][][]\T1/zi4/m/n/10 vignette("datatable-reshape")[][] +[76] +Overfull \hbox (14.50853pt too wide) in paragraph at lines 3693--3697 +[]\T1/zi4/m/n/10 melt []\T1/ptm/m/n/10 is []\T1/zi4/m/n/10 data.table[]\T1/ptm/ +m/n/10 's wide-to-long re-shap-ing tool. We pro-vide an S3 method for melt-ing +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s. +[77] +Overfull \hbox (1.92825pt too wide) in paragraph at lines 3724--3725 +[]\T1/ptm/m/n/10 Pattern-based col-umn match-ing can be achieved with the reg-u +-lar expression- + +Overfull \hbox (5.1285pt too wide) in paragraph at lines 3730--3731 +[]\T1/ptm/m/n/10 name (de-fault []\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 variable\TS1/ +zi4/m/n/10 '[]\T1/ptm/m/n/10 ) of out-put col-umn con-tain-ing in-for-ma-tion a +bout which +[78] [79] +Underfull \vbox (badness 10000) has occurred while \output is active [80] +Overfull \hbox (18.77168pt too wide) in paragraph at lines 3859--3859 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="(.)_(.)"))[] + +Overfull \hbox (32.27168pt too wide) in paragraph at lines 3860--3860 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="([dc])_(.)"))[] +[81] [82] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3966--3966 + []\T1/zi4/m/n/9 (dt1 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(1:3, + 2)], X = 1:6, key = c("A", "B")))[] + +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3967--3967 + []\T1/zi4/m/n/9 (dt2 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(2:4, + 2)], Y = 6:1, key = c("A", "B")))[] +[83] [84] +Overfull \hbox (47.01965pt too wide) in paragraph at lines 4110--4111 +[]\T1/ptm/m/n/10 Note that both []\T1/zi4/m/n/10 nafill []\T1/ptm/m/n/10 and [] +\T1/zi4/m/n/10 setnafill []\T1/ptm/m/n/10 pro-vide some ver-bose out-put when [ +]\T1/zi4/m/n/10 getOption(\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 datatable.verbose\TS1 +/zi4/m/n/10 '\T1/zi4/m/n/10 ) +[85] [86] +Overfull \hbox (2.03732pt too wide) in paragraph at lines 4235--4236 +[]\T1/ptm/m/n/10 Key en-hance-ments in-clude au-to-matic out-put com-pres-sion +of many ob-ser-va-tions and con-cise column- +[87] [88] [89] +Underfull \vbox (badness 10000) has occurred while \output is active [90] +[91] [92] [93] +Overfull \hbox (11.06816pt too wide) in paragraph at lines 4549--4550 +[]\T1/ptm/m/n/10 Character, spec-i-fy-ing the "align-ment" of the rolling win-d +ow, de-fault-ing to []\T1/zi4/m/n/10 "right"[]\T1/ptm/m/n/10 . +[94] +Overfull \hbox (27.54721pt too wide) in paragraph at lines 4567--4571 +[]\T1/ptm/m/n/10 Argument []\T1/zi4/m/n/10 n []\T1/ptm/m/n/10 al-lows mul-ti-pl +e val-ues to ap-ply rolling func-tions on mul-ti-ple win-dow sizes. If []\T1/zi +4/m/n/10 adaptive=TRUE[]\T1/ptm/m/n/10 , +[95] +Overfull \hbox (25.75847pt too wide) in paragraph at lines 4634--4637 +[]\T1/zi4/m/n/10 partial []\T1/ptm/m/n/10 win-dow fea-ture is not sup-ported, a +l-though it can be ac-com-plished by us-ing []\T1/zi4/m/n/10 adaptive=TRUE[]\T1 +/ptm/m/n/10 , +[96] +Underfull \vbox (badness 10000) has occurred while \output is active [97] +[98] [99] [100] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 4893--4893 + []\T1/zi4/m/n/9 setnames(DT, old, new, skip_absent = TRUE) # skips old[3] beca +use "c" is not a column name of DT[] + +Overfull \hbox (14.24408pt too wide) in paragraph at lines 4909--4909 + []\T1/zi4/m/n/9 setnames(DT,c("a","E"),c("A","F")) # multiple by name (warning + if either "a" or "E" is missing)[] +[101] +Overfull \hbox (1.12917pt too wide) in paragraph at lines 4953--4954 +[]\T1/ptm/m/n/10 If one of them (not both) was pro-vided with a col-umn name or + num-ber, []\T1/zi4/m/n/10 neworder +[102] [103] [104] [105] +Overfull \hbox (33.06992pt too wide) in paragraph at lines 5122--5122 + [] \T1/zi4/m/n/10 setDTthreads(threads = NULL, restore_after_fork = NULL, per +cent = NULL, throttle = NULL) +[106] +Overfull \hbox (83.5179pt too wide) in paragraph at lines 5144--5145 +\T1/ptm/m/n/10 cur-rent num-ber of threads data.table is us-ing. For ex-am-ple, + the en-vi-ron-ment vari-able []\T1/zi4/m/n/10 R_DATATABLE_NUM_PROCS_PERCENT + +Overfull \hbox (2.44835pt too wide) in paragraph at lines 5148--5149 +[]\T1/zi4/m/n/10 OMP_THREAD_LIMIT []\T1/ptm/m/n/10 to 2, so de-vel-op-ers of CR +AN pack-ages should never change []\T1/zi4/m/n/10 OMP_THREAD_LIMIT +[107] [108] +Overfull \hbox (9.36925pt too wide) in paragraph at lines 5273--5278 +\T1/ptm/m/n/10 ments; e.g., []\T1/zi4/m/n/10 setkey(DT,a)[.("foo")][]\T1/ptm/m/ +n/10 . If you re-quire a copy, take a copy first (us-ing []\T1/zi4/m/n/10 DT2=c +opy(DT)[]\T1/ptm/m/n/10 ). +[109] +Overfull \hbox (9.02112pt too wide) in paragraph at lines 5309--5314 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 ta +bles[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 sort.list[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][][ +]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 set[][][] [] +[]:=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[][][][]\T1/ptm/m/n/1 +0 , [][][]\T1/zi4/m/n/10 setcolorder[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 setattr[][][][]\T1/ptm/m/n/10 , +[110] [111] +Overfull \hbox (5.52832pt too wide) in paragraph at lines 5451--5452 +\T1/ptm/m/n/10 Ad-di-tional []\T1/zi4/m/n/10 all []\T1/ptm/m/n/10 ar-gu-ment co +n-trols how du-pli-cated rows are han-dled. Func-tions []\T1/zi4/m/n/10 finters +ect[]\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 setdiff +[112] +Overfull \hbox (6.781pt too wide) in paragraph at lines 5493--5494 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 rb +indlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 all.equal.data.table[][][] +[]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T +1/zi4/m/n/10 duplicated[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 uniqueN[][ +][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 anyDuplicated[][][] +[113] [114] +Overfull \hbox (19.21956pt too wide) in paragraph at lines 5562--5566 +\T1/zi4/m/n/10 na.last)] []\T1/ptm/m/n/10 and its de-fault is []\T1/zi4/m/n/10 +TRUE[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 and []\T1/zi4 +/m/n/10 setorderv []\T1/ptm/m/n/10 only ac-cept []\T1/zi4/m/n/10 TRUE[]\T1/ptm/ +m/n/10 /[]\T1/zi4/m/n/10 FALSE + +Overfull \hbox (21.31844pt too wide) in paragraph at lines 5588--5594 +[]\T1/zi4/m/n/10 na.last []\T1/ptm/m/n/10 ar-gu-ment, by de-fault, is []\T1/zi4 +/m/n/10 FALSE []\T1/ptm/m/n/10 for []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 a +nd []\T1/zi4/m/n/10 setorderv []\T1/ptm/m/n/10 to be con-sis-tent with []\T1/zi +4/m/n/10 data.table[]\T1/ptm/m/n/10 's +[115] +Overfull \hbox (34.28088pt too wide) in paragraph at lines 5625--5630 +[][]$\T1/zi4/m/n/10 https : / / medium . com / basecs / getting-[]to-[]the-[]ro +ot-[]of-[]sorting-[]with-[]radix-[]sort-[]f8e9240d4224$[][] +[116] +Overfull \hbox (1.8694pt too wide) in paragraph at lines 5675--5676 +\T1/ptm/m/n/10 "for-wards"), []\T1/zi4/m/n/10 "shift" []\T1/ptm/m/n/10 (be-have + same as []\T1/zi4/m/n/10 "lag" []\T1/ptm/m/n/10 ex-cept given names) and []\T1 +/zi4/m/n/10 "cyclic" +[117] [118] +Underfull \hbox (badness 10000) in paragraph at lines 5779--5781 + +[119] +Overfull \hbox (17.0685pt too wide) in paragraph at lines 5816--5817 +\T1/ptm/m/n/10 the group, its row lo-ca-tion in []\T1/zi4/m/n/10 x[]\T1/ptm/m/n +/10 . This is use-ful to sub-set in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 ; e.g. [ +]\T1/zi4/m/n/10 DT[, .I[which.max(somecol)], + +Overfull \hbox (23.26248pt too wide) in paragraph at lines 5838--5838 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1) +[120] +Overfull \hbox (1.83873pt too wide) in paragraph at lines 5895--5896 +[]\T1/ptm/m/n/10 character vec-tor. Col-umn names on which split should be made +. For []\T1/zi4/m/n/10 length(by) +[121] [122] [123] +Overfull \hbox (19.7582pt too wide) in paragraph at lines 6069--6070 +\T1/ptm/m/n/10 tracker. For the present mo-ment there is an op-tion to dis-able + that: []\T1/zi4/m/n/10 options(datatable.enlist=FALSE)[]\T1/ptm/m/n/10 . +[124] [125] +Overfull \hbox (5.3492pt too wide) in paragraph at lines 6147--6148 +[]\T1/ptm/m/n/10 Usually []\T1/zi4/m/n/10 tables() []\T1/ptm/m/n/10 is ex-e-cut +ed at the prompt, where []\T1/zi4/m/n/10 parent.frame() []\T1/ptm/m/n/10 re-tur +ns []\T1/zi4/m/n/10 .GlobalEnv[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 tables() +[126] +Overfull \hbox (0.35852pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 If you are test-ing the print-ing/console out-put be-haviour; +e.g. with []\T1/zi4/m/n/10 verbose=TRUE + +Overfull \hbox (4.27966pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 options(datatable.verbose=TRUE)[]\T1/ptm/m +/n/10 . Again, regex-compatible and case sen- +[127] [128] [129] +Overfull \hbox (10.83717pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 If all tests were suc-cess-ful, []\T1/zi4/m/n/10 TRUE []\T1/pt +m/m/n/10 is re-turned. Oth-er-wise, see the []\T1/zi4/m/n/10 silent []\T1/ptm/m +/n/10 ar-gu-ment above. []\T1/zi4/m/n/10 silent=TRUE + +Overfull \hbox (19.6285pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 is in-tended for use at the start of pro-duc-tion scripts; e.g +. []\T1/zi4/m/n/10 stopifnot(test.data.table(silent=TRUE)) +[130] [131] +Overfull \hbox (26.22261pt too wide) in paragraph at lines 6393--6393 + []\T1/zi4/m/n/9 DT = DT[, transform(.SD, d=max(b)), by="c"] # same, but even + worse as .SD is copied for each group[] +[132] [133] +Overfull \hbox (17.35712pt too wide) in paragraph at lines 6511--6512 +\T1/ptm/m/n/10 in use. Cur-rently, it is just the list vec-tor of col-umn point +-ers that is over-allocated (i.e. []\T1/zi4/m/n/10 truelength(DT)[]\T1/ptm/m/n/ +10 ), +[134] [135] [136] +Overfull \hbox (12.75021pt too wide) in paragraph at lines 6607--6607 + []\T1/zi4/m/n/9 # convert the remaining using \TS1/zi4/m/n/9 '\T1/zi4/m/n/9 ty +pe.convert(x, as.is=TRUE)\TS1/zi4/m/n/9 ' \T1/zi4/m/n/9 (i.e. what type.convert +=TRUE does)[] + +Overfull \hbox (26.25941pt too wide) in paragraph at lines 6608--6608 + []\T1/zi4/m/n/9 DT[, tstrsplit(v, " ", type.convert=list(as.IDate=4L, function +(x) type.convert(x, as.is=TRUE)))][] + +Overfull \hbox (48.92793pt too wide) in paragraph at lines 6650--6653 +[]\T1/ptm/m/n/10 By de-fault the func-tion uses our GitLab-hosted R repos-i-tor +y at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data.table[]\T1/ptm/m/n/10 . + + +Overfull \hbox (144.81755pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 We also pub-lish bleed-ing edge ver-sion of the pack-age on GitH +ub-hosted R repos-i-tory at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data. +table + +Overfull \hbox (66.05753pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 There are also other repos-i-to-ries main-tained by R com-mu-nit +y, for ex-am-ple []\T1/zi4/m/n/10 https://rdatatable.r-universe.dev[]\T1/ptm/m/ +n/10 . +[137] (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.ind [138] + +LaTeX Font Warning: Font shape `T1/zi4/m/it' undefined +(Font) using `T1/zi4/m/n' instead on input line 71. + +[139] [140] [141] [142] [143]) (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.aux) + +LaTeX Font Warning: Some font shapes were not available, defaults substituted. + + +Package rerunfilecheck Warning: File `Rd2.out' has changed. +(rerunfilecheck) Rerun to get outlines right +(rerunfilecheck) or use package `bookmark'. + + ) +(see the transcript file for additional information) +pdfTeX warning (dest): name{Rfn.install.packages} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.type.convert} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.try} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.unsetenv} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.object.size} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.objects} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.ls} has been referenced but does not exist, rep +laced by a fixed one + + +pdfTeX warning (dest): name{Rfn.eval} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.name} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.call} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.split.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort.list} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.mean} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.rle} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.print.default} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.getS3method} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.grep} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.merge.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::grepl} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tail} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.head} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.NROW} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.DateTimeClasses} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.strptime} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.POSIXct} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.Date} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.round} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.table} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.csv} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.options} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.yaml} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.setlocale} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.url} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.system} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tempdir} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.download.file} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::write.csv} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::tempdir} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.yaml.load} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.make.names} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::read.csv} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.path.expand} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.POSIXct} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.delim\(\)} has been referenced but does no +t exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv\(\)} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.storage.mode} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.unique.data.frame} has been referenced but does + not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn..Rpcent.in.Rpcent.} has been referenced but doe +s not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.match} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.charmatch} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.array} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.matrix} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.format} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.vector} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.integer64} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.is.numeric} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.bquote} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.[.data.frame} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.frame} has been referenced but does not ex +ist, replaced by a fixed one + + +Output written on Rd2.pdf (143 pages, 505767 bytes). +Transcript written on Rd2.log. +This is makeindex, version 2.17 [TeX Live 2023] (kpathsea + Thai support). +Scanning input file Rd2.idx....done (673 entries accepted, 6 rejected). +Sorting entries........done (6763 comparisons). +Generating output file Rd2.ind....done (788 lines written, 5 warnings). +Output written in Rd2.ind. +Transcript written in Rd2.ilg. +This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex) + restricted \write18 enabled. +entering extended mode +LaTeX2e <2023-11-01> patch level 1 +L3 programming layer <2024-01-22> +(./Rd2.tex +(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls +Document Class: book 2023/05/17 v1.4n Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo)) +(/usr/share/R/share/texmf/tex/latex/Rd.sty +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/longtable.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/bm.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty) +(/usr/share/texlive/texmf-dist/tex/latex/tools/verbatim.sty) +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/mathrsfs.sty) +(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/zi4.sty +`inconsolata-zi4' v1.12, 2019/05/17 Text macros for Inconsolata (msharpe) +(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/mathcolor.ltx)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty) +(/usr/share/texlive/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty +(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty) +(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty) +(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty))) +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def) +(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/puenc.def) +(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/base/atbegshi-ltx.sty)) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +(/usr/share/texlive/texmf-dist/tex/latex/base/atveryend-ltx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty)))) +(/usr/share/texlive/texmf-dist/tex/latex/base/makeidx.sty) +(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty) +Writing index file Rd2.idx +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd) +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.aux) +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +) (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.out) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.out) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/t1zi4.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) +(/usr/share/texlive/texmf-dist/tex/latex/jknapltx/ursfs.fd) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd) +(/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.toc [1{/var/lib/texmf/fonts/map/pdftex +/updmap/pdftex.map}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}{ +/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}{/usr/share/texlive/ +texmf-dist/fonts/enc/dvips/inconsolata/i4-t1-0.enc}] [2]) +Overfull \hbox (43.10059pt too wide) in paragraph at lines 63--63 + []\T1/zi4/m/n/10 data.table(..., keep.rownames=FALSE, check.names=FALSE, key=N +ULL, stringsAsFactors=FALSE) +(/usr/share/texlive/texmf-dist/tex/latex/inconsolata/ts1zi4.fd) [3{/usr/share/t +exlive/texmf-dist/fonts/enc/dvips/inconsolata/i4-ts1.enc}] +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd) +Overfull \hbox (57.41945pt too wide) in paragraph at lines 114--115 +[]\T1/ptm/m/n/10 This is sum-marised in code as []\T1/zi4/m/n/10 min(length(key +(x)), if (haskey(i)) length(key(i)) + +Overfull \hbox (194.1307pt too wide) in paragraph at lines 124--125 +[]\T1/ptm/m/n/10 See [][][]\T1/zi4/m/n/10 vignette("datatable-keys-fast-subset" +)[][] []\T1/ptm/m/n/10 and [][][]\T1/zi4/m/n/10 vignette("datatable-secondary-i +ndices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Overfull \hbox (3.91003pt too wide) in paragraph at lines 129--130 +[]\T1/zi4/m/n/10 x$a []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 sum(x$a) []\T1/ptm/m +/n/10 as a vec-tor re-spec-tively. []\T1/zi4/m/n/10 x[, .(a, b)] []\T1/ptm/m/n/ +10 and []\T1/zi4/m/n/10 x[, .(sa=sum(a), +[4] +Overfull \hbox (34.84958pt too wide) in paragraph at lines 151--152 +[]\T1/ptm/m/n/10 a []\T1/zi4/m/n/10 list() []\T1/ptm/m/n/10 of ex-pres-sions of + col-umn names: e.g., []\T1/zi4/m/n/10 DT[, .(sa=sum(a)), by=.(x=x>0, + +Overfull \hbox (20.64027pt too wide) in paragraph at lines 162--163 +[]\T1/ptm/m/it/10 Advanced: \T1/ptm/m/n/10 When []\T1/zi4/m/n/10 i []\T1/ptm/m/ +n/10 is a []\T1/zi4/m/n/10 list []\T1/ptm/m/n/10 (or []\T1/zi4/m/n/10 data.fram +e []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 ), []\T1/zi4/ +m/n/10 DT[i, j, by=.EACHI] +[5] +Overfull \hbox (11.38815pt too wide) in paragraph at lines 181--182 +[]\T1/zi4/m/n/10 -Inf []\T1/ptm/m/n/10 rolls back-wards in-stead; i.e., next ob +-ser-va-tion car-ried back-ward (NOCB). +[6] +Overfull \hbox (2.54861pt too wide) in paragraph at lines 207--208 +[]\T1/ptm/m/n/10 Inversion (col-umn drop-ping in-stead of keep-ing) can be ac-c +om-plished be prepend- + +Overfull \hbox (33.29951pt too wide) in paragraph at lines 209--210 +\T1/ptm/m/n/10 also in-vert a pat-tern as usual with []\T1/zi4/m/n/10 .SDcols=! +patterns(...) []\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 .SDcols=!is.numeric[]\T1/ptm +/m/n/10 . +[7] +Overfull \hbox (64.98978pt too wide) in paragraph at lines 234--235 +[]\T1/ptm/m/n/10 See ex-am-ples as well as [][][]\T1/zi4/m/n/10 vignette("datat +able-secondary-indices-and-auto-indexing")[][][]\T1/ptm/m/n/10 . + +Underfull \hbox (badness 10000) in paragraph at lines 244--245 + + +Underfull \hbox (badness 10000) in paragraph at lines 254--255 + + +Overfull \hbox (56.30783pt too wide) in paragraph at lines 268--268 + [] \T1/zi4/m/n/10 X[, a] # return col \TS1/zi4/m/n/10 +'\T1/zi4/m/n/10 a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 from X as vector. If not foun +d, search in parent frame.[] + +Overfull \hbox (19.66843pt too wide) in paragraph at lines 270--270 + [] \T1/zi4/m/n/10 X[, sum(a)] # return sum(a) as a vector ( +with same scoping rules as above)[] + +Overfull \hbox (129.66843pt too wide) in paragraph at lines 272--272 + [] \T1/zi4/m/n/10 X[, sum(a), by=c] # same as above, .() can be o +mitted in j and by on single expression for convenience[] + +Overfull \hbox (93.0188pt too wide) in paragraph at lines 273--273 + [] \T1/zi4/m/n/10 X[, sum(a), by=c:f] # get sum(a) grouped by all c +olumns in between \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 f\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (bot +h inclusive)[] + +Overfull \hbox (98.0188pt too wide) in paragraph at lines 275--275 + [] \T1/zi4/m/n/10 X[, sum(a), keyby=b] # get sum(a) grouped by \TS1/ +zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , and sort that res +ult by the grouping column \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 b\TS1/zi4/m/n/10 '[] + + +Overfull \hbox (33.0597pt too wide) in paragraph at lines 277--277 + [] \T1/zi4/m/n/10 X[, sum(a), by=b][order(b)] # same order as above, but by + chaining compound expressions[] + +Overfull \hbox (86.34872pt too wide) in paragraph at lines 278--278 + [] \T1/zi4/m/n/10 X[c>1, sum(a), by=c] # get rows where c>1 is TRUE, + and on those rows, get sum(a) grouped by \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 c\TS1 +/zi4/m/n/10 '[] + +Overfull \hbox (106.34872pt too wide) in paragraph at lines 279--279 + [] \T1/zi4/m/n/10 X[Y, .(a, b), on="c"] # get rows where Y$c == X$c, +and select columns \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4 +/m/n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$b\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 + for those rows[] + +Overfull \hbox (58.02902pt too wide) in paragraph at lines 280--280 + [] \T1/zi4/m/n/10 X[Y, .(a, i.a), on="c"] # get rows where Y$c == X$c, +and then select \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$a\TS1/zi4/m/n/10 ' \T1/zi4/m/ +n/10 and \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 Y$a\TS1/zi4/m/n/10 ' \T1/zi4/m/n/10 (= +i.a)[] + +Overfull \hbox (74.71954pt too wide) in paragraph at lines 281--281 + [] \T1/zi4/m/n/10 X[Y, sum(a*i.a), on="c", by=.EACHI] # for *each* \TS1/zi4 +/m/n/10 '\T1/zi4/m/n/10 Y$c\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 , get sum(a*i.a) on +matching rows in \TS1/zi4/m/n/10 '\T1/zi4/m/n/10 X$c\TS1/zi4/m/n/10 '[] + +Overfull \hbox (104.68887pt too wide) in paragraph at lines 283--283 + [] \T1/zi4/m/n/10 X[, plot(a, b), by=c] # j accepts any expression, g +enerates plot for each group and returns no data[] +[8] +Overfull \hbox (53.0597pt too wide) in paragraph at lines 284--284 + [] \T1/zi4/m/n/10 # see ?assign to add/update/delete columns by reference u +sing the same consistent interface[] + +Overfull \hbox (21.24829pt too wide) in paragraph at lines 304--306 +\T1/ptm/m/n/10 umn called []\T1/zi4/m/n/10 keep []\T1/ptm/m/n/10 con-tain-ing [ +]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 and this is cor-rect be-haviour; []\T1/zi +4/m/n/10 data.table(DF, keep.rownames=TRUE) + +Overfull \hbox (8.80103pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 special-symbols[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 data.frame[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 [.data.frame[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 as.data.table[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 setkey[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[ +][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][] +[]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (3.08105pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 SJ[][][][]\ +T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 tables[][][ +][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 test.data.table[][][][]\T1/ptm/m/n/10 +, [][][]\T1/zi4/m/n/10 IDateTime[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 u +nique.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[][][][]\T1/p +tm/m/n/10 , + +Overfull \hbox (14.401pt too wide) in paragraph at lines 316--317 +[][][]\T1/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setallocco +l[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 + , [][][]\T1/zi4/m/n/10 rbindlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 +setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 datatable-optim +ize[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][][][]\T1/ptm/m/n/10 + , +[9] +Overfull \hbox (3.6858pt too wide) in paragraph at lines 379--379 + []\T1/zi4/m/n/9 DT[x=="a"] # same, single "==" internally +optimised to use binary search (fast)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [10] +Underfull \vbox (badness 10000) has occurred while \output is active [11] +Overfull \hbox (23.26248pt too wide) in paragraph at lines 483--483 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1)[] + +Underfull \vbox (badness 10000) has occurred while \output is active [12] +[13] (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmtt.fd) +(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmtt.fd) [14] +Overfull \hbox (306.25671pt too wide) in paragraph at lines 632--632 + [] \T1/zi4/m/n/10 DT[, col := val] # update (o +r add at the end if doesn\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 t exist) a column call +ed "col" with value "val" (recycled if necessary).[] + +Overfull \hbox (221.26694pt too wide) in paragraph at lines 633--633 + [] \T1/zi4/m/n/10 DT[i, col := val] # same as a +bove, but only for those rows specified in i and (for new columns) NA elsewhere +.[] + +Overfull \hbox (419.58664pt too wide) in paragraph at lines 635--635 + [] \T1/zi4/m/n/10 DT[i, (3:6) := val] # update ex +isting columns 3:6 with value. Aside: parens are not required here since : alre +ady makes LHS a call rather than a symbol.[] + +Overfull \hbox (218.00858pt too wide) in paragraph at lines 636--636 + [] \T1/zi4/m/n/10 DT[i, colvector := val, with = FALSE] # OLD synta +x. The contents of "colvector" in calling scope determine the column(s).[] +[15] +Overfull \hbox (356.28738pt too wide) in paragraph at lines 637--637 + [] \T1/zi4/m/n/10 DT[i, (colvector) := val] # same (NOW + PREFERRED) shorthand syntax. The parens are enough to stop the LHS being a sym +bol; same as c(colvector).[] + +Overfull \hbox (226.82571pt too wide) in paragraph at lines 638--638 + [] \T1/zi4/m/n/10 DT[i, colC := mean(colB), by = colA] # update (o +r add) column called "colC" by reference by group. A major feature of \TS1/cmtt +/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 .[] + +Overfull \hbox (73.49579pt too wide) in paragraph at lines 654--654 + [] \T1/zi4/m/n/10 DT[, {col1 := 1L; col2 := 2L}] # Use the f +unctional form, \TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 :=\TS1/cmtt/m/n/10 `\T1/zi4/m/ +n/10 (), instead (see above).[] + +Overfull \hbox (21.07907pt too wide) in paragraph at lines 660--661 +\T1/ptm/m/n/10 rea-son why []\T1/zi4/m/n/10 := []\T1/ptm/m/n/10 has been im-ple +-mented in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 . Please see [][][]\T1/zi4/m/n/10 + vignette("datatable-reference-semantics")[][] +[16] [17] +Overfull \hbox (9.73488pt too wide) in paragraph at lines 765--765 + []\T1/zi4/m/n/9 # However, normally, we call [.data.table *once* on *large* da +ta, not many times on small data.[] + +Underfull \vbox (badness 10000) has occurred while \output is active [18] +Overfull \hbox (71.21884pt too wide) in paragraph at lines 802--803 +[][][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / a / 10913296 / 403310$[ +][] \T1/ptm/m/n/10 (but im-ple-mented in C with-out us-ing []\T1/zi4/m/n/10 .In +ternal(inspect())[]\T1/ptm/m/n/10 ) +[19] +Overfull \hbox (34.76044pt too wide) in paragraph at lines 827--827 + [] \T1/zi4/m/n/10 ignore.col.order=FALSE, ignore.row.order=FALSE, tolerance +=sqrt(.Machine$double.eps),[] + +Overfull \hbox (11.40001pt too wide) in paragraph at lines 835--837 +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s to com-pare. If []\T1/zi4/m/n/10 +current []\T1/ptm/m/n/10 is not a []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 , + but []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (4.11882pt too wide) in paragraph at lines 840--842 +\T1/ptm/m/n/10 are fac-tors be-fore run-ning equal-ity check. It ef-fect only w +hen []\T1/zi4/m/n/10 check.attributes + +Overfull \hbox (71.63823pt too wide) in paragraph at lines 845--846 +\T1/ptm/m/n/10 data.table but also at-tributes of the columns. It will skip []\ +T1/zi4/m/n/10 c("row.names",".internal.selfref") + +Overfull \hbox (79.65813pt too wide) in paragraph at lines 857--858 +[]\T1/ptm/m/n/10 A nu-meric value used when com-par-ing nu-meric columns, by de +-fault []\T1/zi4/m/n/10 sqrt(.Machine$double.eps)[]\T1/ptm/m/n/10 . +[20] [21] +Overfull \hbox (15.57816pt too wide) in paragraph at lines 976--977 +[]\T1/zi4/m/n/10 keep.rownames []\T1/ptm/m/n/10 ar-gu-ment can be used to pre-s +erve the (row)names at-tribute in the re-sult-ing []\T1/zi4/m/n/10 data.table[] +\T1/ptm/m/n/10 . + +Overfull \hbox (26.40112pt too wide) in paragraph at lines 980--981 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 se +tDT[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , +[][][]\T1/zi4/m/n/10 copy[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setkey[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 SJ[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 CJ[][][][]\T1/ptm/m +/n/10 , [][][]\T1/zi4/m/n/10 merge.data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 :=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setalloccol[][][][] +\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 truelength[][][][]\T1/ptm/m/n/10 , +[22] [23] [24] +Overfull \hbox (0.76248pt too wide) in paragraph at lines 1160--1160 + [] \T1/zi4/m/n/9 sample.dt <- data.table(date = as.Date((Sys.Date()-999):Sys. +Date(),origin="1970-01-01"),[] +[25] +Overfull \hbox (5.00627pt too wide) in paragraph at lines 1201--1204 +[]\T1/ptm/m/n/10 Any or-der-able vec-tor, i.e., those with rel-e-vant meth-ods +for []\TS1/cmtt/m/n/10 `\T1/zi4/m/n/10 <=\TS1/cmtt/m/n/10 `[]\T1/ptm/m/n/10 , s +uch as []\T1/zi4/m/n/10 numeric[]\T1/ptm/m/n/10 , + +Overfull \hbox (3.46771pt too wide) in paragraph at lines 1208--1211 +[]\T1/zi4/m/n/10 TRUE []\T1/ptm/m/n/10 means in-clu-sive bounds, i.e., [lower,u +pper]. []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 means ex-clu-sive bounds, +[26] [27] +Overfull \hbox (89.73999pt too wide) in paragraph at lines 1278--1278 + [] \T1/zi4/m/n/10 Rcpp::cppFunction("SEXP mysub2(SEXP x, SEXP rows, SEXP cols +) { return DT_subsetDT(x,rows,cols); }",[] +[28] +Overfull \hbox (7.58745pt too wide) in paragraph at lines 1330--1331 +[]\T1/ptm/m/n/10 It may be pos-si-ble to speed up fast-match's hash ta-ble buil +d time by us-ing the tech-nique in []\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 +, +[29] +Overfull \hbox (9.87895pt too wide) in paragraph at lines 1402--1403 +[]\T1/ptm/m/n/10 A []\T1/zi4/m/n/10 copy() []\T1/ptm/m/n/10 may be re-quired wh +en do-ing []\T1/zi4/m/n/10 dt_names = names(DT)[]\T1/ptm/m/n/10 . Due to R's \T +1/ptm/m/it/10 copy-on-modify\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 dt_names +[30] [31] +Overfull \hbox (12.18959pt too wide) in paragraph at lines 1508--1511 +[]\T1/ptm/m/n/10 The ex-pres-sion []\T1/zi4/m/n/10 DT[, lapply(.SD, fun), by=.] + []\T1/ptm/m/n/10 gets op-ti-mised to []\T1/zi4/m/n/10 DT[, list(fun(a), fun(b) +, +[32] [33] +Underfull \vbox (badness 10000) has occurred while \output is active [34] +[35] +Overfull \hbox (58.2086pt too wide) in paragraph at lines 1702--1703 +[]\T1/ptm/m/n/10 logical; []\T1/zi4/m/n/10 value.var.in.dots = TRUE []\T1/ptm/m +/n/10 is short-hand to save set-ting both []\T1/zi4/m/n/10 value.var.in.LHSdots + + +Overfull \hbox (10.00912pt too wide) in paragraph at lines 1709--1710 +\T1/ptm/m/n/10 vari-ables not oth-er-wise men-tioned in []\T1/zi4/m/n/10 formul +a[]\T1/ptm/m/n/10 , and []\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 de-pend-ing + on []\T1/zi4/m/n/10 value.var.in.LHSdots +[36] +Overfull \hbox (7.89836pt too wide) in paragraph at lines 1725--1726 +[]\T1/zi4/m/n/10 value.var []\T1/ptm/m/n/10 is a char-ac-ter vec-tor or a list +of length one, each func-tion men-tioned un-der []\T1/zi4/m/n/10 fun.aggregate + +Overfull \hbox (7.31819pt too wide) in paragraph at lines 1727--1728 +[]\T1/ptm/m/n/10 Historical note: []\T1/zi4/m/n/10 dcast.data.table []\T1/ptm/m +/n/10 was orig-i-nally de-signed as an en-hance-ment to []\T1/zi4/m/n/10 reshap +e2::dcast +[37] +Overfull \hbox (15.71954pt too wide) in paragraph at lines 1761--1761 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=FALSE) # all missing combinations + of LHS and RHS[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1762--1762 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(FALSE, TRUE)) # all missing combinations + of LHS only[] + +Overfull \hbox (15.74715pt too wide) in paragraph at lines 1763--1763 + []\T1/zi4/m/n/9 dcast(DT, v1+v2~v3, value.var=\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 v4 +\TS1/zi4/m/n/9 '\T1/zi4/m/n/9 , drop=c(TRUE, FALSE)) # all missing combinations + of RHS only[] + +Overfull \hbox (26.25021pt too wide) in paragraph at lines 1771--1771 + []\T1/zi4/m/n/9 dcast(DT, ... ~ v3, value.var="v4", value.var.in.dots=TRUE) # +same as v1+v2+v4~v3, value.var="v4"[] +[38] [39] +Overfull \hbox (23.92102pt too wide) in paragraph at lines 1892--1896 +[][][]\T1/zi4/m/n/10 setNumericRounding[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m +/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 duplicated[][][][ +]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T1 +/zi4/m/n/10 all.equal[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 fsetdiff[][] +[][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 funion[][][][]\T1/ptm/m/n/10 , [][][] +\T1/zi4/m/n/10 fintersect[][][][]\T1/ptm/m/n/10 , + +Overfull \hbox (8.25941pt too wide) in paragraph at lines 1928--1928 + []\T1/zi4/m/n/9 unique(DT, by="B", fromLast=FALSE) # equivalent: DT[!duplicate +d(DT, by="B", fromLast=FALSE)][] +[40] [41] [42] [43] [44] [45] +Overfull \hbox (11.16714pt too wide) in paragraph at lines 2209--2212 +[]\T1/ptm/m/n/10 Usually, []\T1/zi4/m/n/10 x []\T1/ptm/m/n/10 is a very large d +ata.table with small in-ter-val ranges, and []\T1/zi4/m/n/10 y []\T1/ptm/m/n/10 + is much smaller \T1/ptm/m/it/10 keyed []\T1/zi4/m/n/10 data.table +[46] +Overfull \hbox (1.54832pt too wide) in paragraph at lines 2252--2262 +[]\T1/ptm/m/n/10 The types shown here are iden-ti-cal in func-tion-al-ity to th +e func-tion []\T1/zi4/m/n/10 findOverlaps +[47] +Overfull \hbox (1.8009pt too wide) in paragraph at lines 2330--2333 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][]$\T1/zi4/m/n/10 htt +ps : / / www . bioconductor . org / packages / release / bioc / html / IRanges +. html$[][]\T1/ptm/m/n/10 , +[48] [49] [50] +Overfull \hbox (4.75021pt too wide) in paragraph at lines 2469--2469 + []\T1/zi4/m/n/10 na.strings=getOption("datatable.na.strings","NA"), # due to +change to ""; see NEWS[] + +Overfull \hbox (13.08014pt too wide) in paragraph at lines 2480--2480 + []\T1/zi4/m/n/10 logical01=getOption("datatable.logical01", FALSE), # due to +change to TRUE; see NEWS[] +[51] +Overfull \hbox (78.13817pt too wide) in paragraph at lines 2493--2494 +[]\T1/ptm/m/n/10 A shell com-mand that pre-processes the file; e.g. []\T1/zi4/m +/n/10 fread(cmd=paste("grep",word,"filename"))[]\T1/ptm/m/n/10 . +[52] [53] +Overfull \hbox (20.37852pt too wide) in paragraph at lines 2518--2519 +\T1/ptm/m/n/10 is passed to [][][]\T1/zi4/m/n/10 setindexv[][][][]\T1/ptm/m/n/1 +0 . As with []\T1/zi4/m/n/10 key[]\T1/ptm/m/n/10 , comma-separated no-ta-tion l +ike []\T1/zi4/m/n/10 index="x,y,z" + +Overfull \hbox (6.06009pt too wide) in paragraph at lines 2520--2521 +\T1/ptm/m/n/10 ar-gu-ment can be changed with []\T1/zi4/m/n/10 options(datatabl +e.fread.datatable=FALSE)[]\T1/ptm/m/n/10 . + +Overfull \hbox (0.26845pt too wide) in paragraph at lines 2528--2529 +\T1/ptm/m/n/10 char-ac-ter date-times in lo-cal time-zone; e.g. by us-ing []\T1 +/zi4/m/n/10 "POSIXct" []\T1/ptm/m/n/10 in []\T1/zi4/m/n/10 colClasses=[]\T1/ptm +/m/n/10 . +[54] [55] +Overfull \hbox (31.92902pt too wide) in paragraph at lines 2560--2561 +\T1/ptm/m/n/10 up to that point in that field must be bal-anced; e.g. []\T1/zi4 +/m/n/10 ...,2,"www.blah?x="one",y="two"",3.14,...[]\T1/ptm/m/n/10 . + +Overfull \hbox (88.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 1727772 / qui +ckly-[]reading-[]very-[]large-[]tables-[]as-[]dataframes-[]in-[]r$[][] + +Overfull \hbox (64.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 415515 / how- +[]can-[]i-[]read-[]and-[]manipulate-[]csv-[]file-[]data-[]in-[]c$[][] + +Overfull \hbox (53.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9352887 / str +ategies-[]for-[]reading-[]in-[]csv-[]files-[]in-[]pieces$[][] + +Overfull \hbox (13.28088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 258091 / when +-[]should-[]i-[]use-[]mmap-[]for-[]file-[]access$[][] + +Overfull \hbox (47.78088pt too wide) in paragraph at lines 2599--2610 +[][]$\T1/zi4/m/n/10 https : / / stackoverflow . com / questions / 9608950 / rea +ding-[]huge-[]files-[]using-[]memory-[]mapped-[]files$[][] +[56] [57] +Overfull \hbox (24.75635pt too wide) in paragraph at lines 2648--2648 + []\T1/zi4/m/n/9 # TODO: add numerals=c("allow.loss", "warn.loss", "no.loss") f +rom base::read.table, +"use.Rmpfr"[] + +Underfull \vbox (badness 10000) has occurred while \output is active [58] +Overfull \hbox (27.78088pt too wide) in paragraph at lines 2752--2752 + []\T1/zi4/m/n/9 fread("https://github.com/Rdatatable/data.table/raw/1.14.0/ins +t/tests/issue_785_fread.txt.gz")[] + +Underfull \vbox (badness 10000) has occurred while \output is active [59] +[60] +Overfull \hbox (26.39984pt too wide) in paragraph at lines 2823--2823 + [] \T1/zi4/m/n/10 logical01 = getOption("datatable.logical01", FALSE), # due + to change to TRUE; see NEWS[] +[61] +Overfull \hbox (7.74875pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 Should row names be writ-ten? For com-pat-i-bil-ity with []\T1 +/zi4/m/n/10 data.frame []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 write.csv + +Overfull \hbox (1.69868pt too wide) in paragraph at lines 2848--2849 +[]\T1/ptm/m/n/10 since []\T1/zi4/m/n/10 data.table []\T1/ptm/m/n/10 never has r +ow names. Hence de-fault []\T1/zi4/m/n/10 FALSE []\T1/ptm/m/n/10 un-like []\T1/ +zi4/m/n/10 write.csv[]\T1/ptm/m/n/10 . + +Overfull \hbox (18.6402pt too wide) in paragraph at lines 2864--2865 +[]\T1/ptm/m/n/10 "ISO" (de-fault) - []\T1/zi4/m/n/10 2016-09-12[]\T1/ptm/m/n/10 + , []\T1/zi4/m/n/10 18:12:16 []\T1/ptm/m/n/10 and []\T1/zi4/m/n/10 2016-09-12T1 +8:12:16.999999Z[]\T1/ptm/m/n/10 . +[62] +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + + +Underfull \hbox (badness 10000) in paragraph at lines 2871--2874 + +[63] +Overfull \hbox (1.54796pt too wide) in paragraph at lines 2889--2890 +[]\T1/ptm/m/n/10 To save space, []\T1/zi4/m/n/10 fwrite []\T1/ptm/m/n/10 prefer +s to write wide nu-meric val-ues in sci-en-tific no-ta-tion -- e.g. []\T1/zi4/m +/n/10 10000000000 +[64] [65] [66] +Overfull \hbox (81.78088pt too wide) in paragraph at lines 3032--3034 +[][][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / stati +c / queries-[]table-[]expressions . html # QUERIES-[]GROUPING-[]SETS$[][] + +Overfull \hbox (66.28088pt too wide) in paragraph at lines 3032--3034 +[][]$\T1/zi4/m/n/10 https : / / www . postgresql . org / docs / 9 . 5 / static +/ functions-[]aggregate . html # FUNCTIONS-[]GROUPING-[]TABLE$[][] +[67] +Overfull \hbox (0.75328pt too wide) in paragraph at lines 3073--3073 + []\T1/zi4/m/n/9 cube(DT, j = c(list(count=.N), lapply(.SD, sum)), by = c("colo +r","year","status"), id=TRUE)[] +[68] [69] +Overfull \hbox (0.11824pt too wide) in paragraph at lines 3261--3268 +\T1/ptm/m/n/10 month, and other date-time in-ter-vals. []\T1/zi4/m/n/10 as.POSI +Xlt []\T1/ptm/m/n/10 is also use-ful. For ex-am-ple, []\T1/zi4/m/n/10 as.POSIXl +t(x)$mon +[70] [71] [72] [73] +Overfull \hbox (0.27834pt too wide) in paragraph at lines 3500--3502 +[]\T1/ptm/m/n/10 Not ap-pli-ca-ble for []\T1/zi4/m/n/10 data.table []\T1/ptm/m/ +n/10 first/last. Any ar-gu-ments here are passed through +[74] [75] +Overfull \hbox (0.50786pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 con-ver-sion spec-i-fied as an ar-gu-ment) whereas []\T1/zi4/m/n +/10 measurev []\T1/ptm/m/n/10 al-lows spec-i-fy-ing group names/conversions + +Overfull \hbox (54.33804pt too wide) in paragraph at lines 3593--3605 +\T1/ptm/m/n/10 us-ing data val-ues (each group and con-ver-sion spec-i-fied as +a list el-e-ment). See [][][]\T1/zi4/m/n/10 vignette("datatable-reshape")[][] +[76] +Overfull \hbox (14.50853pt too wide) in paragraph at lines 3693--3697 +[]\T1/zi4/m/n/10 melt []\T1/ptm/m/n/10 is []\T1/zi4/m/n/10 data.table[]\T1/ptm/ +m/n/10 's wide-to-long re-shap-ing tool. We pro-vide an S3 method for melt-ing +[]\T1/zi4/m/n/10 data.table[]\T1/ptm/m/n/10 s. +[77] +Overfull \hbox (1.92825pt too wide) in paragraph at lines 3724--3725 +[]\T1/ptm/m/n/10 Pattern-based col-umn match-ing can be achieved with the reg-u +-lar expression- + +Overfull \hbox (5.1285pt too wide) in paragraph at lines 3730--3731 +[]\T1/ptm/m/n/10 name (de-fault []\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 variable\TS1/ +zi4/m/n/10 '[]\T1/ptm/m/n/10 ) of out-put col-umn con-tain-ing in-for-ma-tion a +bout which +[78] [79] +Underfull \vbox (badness 10000) has occurred while \output is active [80] +Overfull \hbox (18.77168pt too wide) in paragraph at lines 3859--3859 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="(.)_(.)"))[] + +Overfull \hbox (32.27168pt too wide) in paragraph at lines 3860--3860 + []\T1/zi4/m/n/9 melt(DT.missing.cols, measure.vars=measure(value.name, number= +as.integer, pattern="([dc])_(.)"))[] +[81] [82] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3966--3966 + []\T1/zi4/m/n/9 (dt1 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(1:3, + 2)], X = 1:6, key = c("A", "B")))[] + +Overfull \hbox (11.22874pt too wide) in paragraph at lines 3967--3967 + []\T1/zi4/m/n/9 (dt2 <- data.table(A = c(rep(1L, 5), 2L), B = letters[rep(2:4, + 2)], Y = 6:1, key = c("A", "B")))[] +[83] [84] +Overfull \hbox (47.01965pt too wide) in paragraph at lines 4110--4111 +[]\T1/ptm/m/n/10 Note that both []\T1/zi4/m/n/10 nafill []\T1/ptm/m/n/10 and [] +\T1/zi4/m/n/10 setnafill []\T1/ptm/m/n/10 pro-vide some ver-bose out-put when [ +]\T1/zi4/m/n/10 getOption(\TS1/zi4/m/n/10 '\T1/zi4/m/n/10 datatable.verbose\TS1 +/zi4/m/n/10 '\T1/zi4/m/n/10 ) +[85] [86] +Overfull \hbox (2.03732pt too wide) in paragraph at lines 4235--4236 +[]\T1/ptm/m/n/10 Key en-hance-ments in-clude au-to-matic out-put com-pres-sion +of many ob-ser-va-tions and con-cise column- +[87] [88] [89] +Underfull \vbox (badness 10000) has occurred while \output is active [90] +[91] [92] [93] +Overfull \hbox (11.06816pt too wide) in paragraph at lines 4549--4550 +[]\T1/ptm/m/n/10 Character, spec-i-fy-ing the "align-ment" of the rolling win-d +ow, de-fault-ing to []\T1/zi4/m/n/10 "right"[]\T1/ptm/m/n/10 . +[94] +Overfull \hbox (27.54721pt too wide) in paragraph at lines 4567--4571 +[]\T1/ptm/m/n/10 Argument []\T1/zi4/m/n/10 n []\T1/ptm/m/n/10 al-lows mul-ti-pl +e val-ues to ap-ply rolling func-tions on mul-ti-ple win-dow sizes. If []\T1/zi +4/m/n/10 adaptive=TRUE[]\T1/ptm/m/n/10 , +[95] +Overfull \hbox (25.75847pt too wide) in paragraph at lines 4634--4637 +[]\T1/zi4/m/n/10 partial []\T1/ptm/m/n/10 win-dow fea-ture is not sup-ported, a +l-though it can be ac-com-plished by us-ing []\T1/zi4/m/n/10 adaptive=TRUE[]\T1 +/ptm/m/n/10 , +[96] +Underfull \vbox (badness 10000) has occurred while \output is active [97] +[98] [99] [100] +Overfull \hbox (11.22874pt too wide) in paragraph at lines 4893--4893 + []\T1/zi4/m/n/9 setnames(DT, old, new, skip_absent = TRUE) # skips old[3] beca +use "c" is not a column name of DT[] + +Overfull \hbox (14.24408pt too wide) in paragraph at lines 4909--4909 + []\T1/zi4/m/n/9 setnames(DT,c("a","E"),c("A","F")) # multiple by name (warning + if either "a" or "E" is missing)[] +[101] +Overfull \hbox (1.12917pt too wide) in paragraph at lines 4953--4954 +[]\T1/ptm/m/n/10 If one of them (not both) was pro-vided with a col-umn name or + num-ber, []\T1/zi4/m/n/10 neworder +[102] [103] [104] [105] +Overfull \hbox (33.06992pt too wide) in paragraph at lines 5122--5122 + [] \T1/zi4/m/n/10 setDTthreads(threads = NULL, restore_after_fork = NULL, per +cent = NULL, throttle = NULL) +[106] +Overfull \hbox (83.5179pt too wide) in paragraph at lines 5144--5145 +\T1/ptm/m/n/10 cur-rent num-ber of threads data.table is us-ing. For ex-am-ple, + the en-vi-ron-ment vari-able []\T1/zi4/m/n/10 R_DATATABLE_NUM_PROCS_PERCENT + +Overfull \hbox (2.44835pt too wide) in paragraph at lines 5148--5149 +[]\T1/zi4/m/n/10 OMP_THREAD_LIMIT []\T1/ptm/m/n/10 to 2, so de-vel-op-ers of CR +AN pack-ages should never change []\T1/zi4/m/n/10 OMP_THREAD_LIMIT +[107] [108] +Overfull \hbox (9.36925pt too wide) in paragraph at lines 5273--5278 +\T1/ptm/m/n/10 ments; e.g., []\T1/zi4/m/n/10 setkey(DT,a)[.("foo")][]\T1/ptm/m/ +n/10 . If you re-quire a copy, take a copy first (us-ing []\T1/zi4/m/n/10 DT2=c +opy(DT)[]\T1/ptm/m/n/10 ). +[109] +Overfull \hbox (9.02112pt too wide) in paragraph at lines 5309--5314 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 ta +bles[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 J[][][][]\T1/ptm/m/n/10 , [][ +][]\T1/zi4/m/n/10 sort.list[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 copy[] +[][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setDT[][][][]\T1/ptm/m/n/10 , [][][ +]\T1/zi4/m/n/10 setDF[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 set[][][] [] +[]:=[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 setorder[][][][]\T1/ptm/m/n/1 +0 , [][][]\T1/zi4/m/n/10 setcolorder[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/ +10 setattr[][][][]\T1/ptm/m/n/10 , +[110] [111] +Overfull \hbox (5.52832pt too wide) in paragraph at lines 5451--5452 +\T1/ptm/m/n/10 Ad-di-tional []\T1/zi4/m/n/10 all []\T1/ptm/m/n/10 ar-gu-ment co +n-trols how du-pli-cated rows are han-dled. Func-tions []\T1/zi4/m/n/10 finters +ect[]\T1/ptm/m/n/10 , []\T1/zi4/m/n/10 setdiff +[112] +Overfull \hbox (6.781pt too wide) in paragraph at lines 5493--5494 +[][][]\T1/zi4/m/n/10 data.table[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 rb +indlist[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 all.equal.data.table[][][] +[]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 unique[][][][]\T1/ptm/m/n/10 , [][][]\T +1/zi4/m/n/10 duplicated[][][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 uniqueN[][ +][][]\T1/ptm/m/n/10 , [][][]\T1/zi4/m/n/10 anyDuplicated[][][] +[113] [114] +Overfull \hbox (19.21956pt too wide) in paragraph at lines 5562--5566 +\T1/zi4/m/n/10 na.last)] []\T1/ptm/m/n/10 and its de-fault is []\T1/zi4/m/n/10 +TRUE[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 and []\T1/zi4 +/m/n/10 setorderv []\T1/ptm/m/n/10 only ac-cept []\T1/zi4/m/n/10 TRUE[]\T1/ptm/ +m/n/10 /[]\T1/zi4/m/n/10 FALSE + +Overfull \hbox (21.31844pt too wide) in paragraph at lines 5588--5594 +[]\T1/zi4/m/n/10 na.last []\T1/ptm/m/n/10 ar-gu-ment, by de-fault, is []\T1/zi4 +/m/n/10 FALSE []\T1/ptm/m/n/10 for []\T1/zi4/m/n/10 setorder []\T1/ptm/m/n/10 a +nd []\T1/zi4/m/n/10 setorderv []\T1/ptm/m/n/10 to be con-sis-tent with []\T1/zi +4/m/n/10 data.table[]\T1/ptm/m/n/10 's +[115] +Overfull \hbox (34.28088pt too wide) in paragraph at lines 5625--5630 +[][]$\T1/zi4/m/n/10 https : / / medium . com / basecs / getting-[]to-[]the-[]ro +ot-[]of-[]sorting-[]with-[]radix-[]sort-[]f8e9240d4224$[][] +[116] +Overfull \hbox (1.8694pt too wide) in paragraph at lines 5675--5676 +\T1/ptm/m/n/10 "for-wards"), []\T1/zi4/m/n/10 "shift" []\T1/ptm/m/n/10 (be-have + same as []\T1/zi4/m/n/10 "lag" []\T1/ptm/m/n/10 ex-cept given names) and []\T1 +/zi4/m/n/10 "cyclic" +[117] [118] +Underfull \hbox (badness 10000) in paragraph at lines 5779--5781 + +[119] +Overfull \hbox (17.0685pt too wide) in paragraph at lines 5816--5817 +\T1/ptm/m/n/10 the group, its row lo-ca-tion in []\T1/zi4/m/n/10 x[]\T1/ptm/m/n +/10 . This is use-ful to sub-set in []\T1/zi4/m/n/10 j[]\T1/ptm/m/n/10 ; e.g. [ +]\T1/zi4/m/n/10 DT[, .I[which.max(somecol)], + +Overfull \hbox (23.26248pt too wide) in paragraph at lines 5838--5838 + []\T1/zi4/m/n/9 DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1, +1,2,2), y=c(1,3,6), a=1:9, b=9:1) +[120] +Overfull \hbox (1.83873pt too wide) in paragraph at lines 5895--5896 +[]\T1/ptm/m/n/10 character vec-tor. Col-umn names on which split should be made +. For []\T1/zi4/m/n/10 length(by) +[121] [122] [123] +Overfull \hbox (19.7582pt too wide) in paragraph at lines 6069--6070 +\T1/ptm/m/n/10 tracker. For the present mo-ment there is an op-tion to dis-able + that: []\T1/zi4/m/n/10 options(datatable.enlist=FALSE)[]\T1/ptm/m/n/10 . +[124] [125] +Overfull \hbox (5.3492pt too wide) in paragraph at lines 6147--6148 +[]\T1/ptm/m/n/10 Usually []\T1/zi4/m/n/10 tables() []\T1/ptm/m/n/10 is ex-e-cut +ed at the prompt, where []\T1/zi4/m/n/10 parent.frame() []\T1/ptm/m/n/10 re-tur +ns []\T1/zi4/m/n/10 .GlobalEnv[]\T1/ptm/m/n/10 . []\T1/zi4/m/n/10 tables() +[126] +Overfull \hbox (0.35852pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 If you are test-ing the print-ing/console out-put be-haviour; +e.g. with []\T1/zi4/m/n/10 verbose=TRUE + +Overfull \hbox (4.27966pt too wide) in paragraph at lines 6195--6196 +[]\T1/ptm/m/n/10 or []\T1/zi4/m/n/10 options(datatable.verbose=TRUE)[]\T1/ptm/m +/n/10 . Again, regex-compatible and case sen- +[127] [128] [129] +Overfull \hbox (10.83717pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 If all tests were suc-cess-ful, []\T1/zi4/m/n/10 TRUE []\T1/pt +m/m/n/10 is re-turned. Oth-er-wise, see the []\T1/zi4/m/n/10 silent []\T1/ptm/m +/n/10 ar-gu-ment above. []\T1/zi4/m/n/10 silent=TRUE + +Overfull \hbox (19.6285pt too wide) in paragraph at lines 6276--6277 +[]\T1/ptm/m/n/10 is in-tended for use at the start of pro-duc-tion scripts; e.g +. []\T1/zi4/m/n/10 stopifnot(test.data.table(silent=TRUE)) +[130] [131] +Overfull \hbox (26.22261pt too wide) in paragraph at lines 6393--6393 + []\T1/zi4/m/n/9 DT = DT[, transform(.SD, d=max(b)), by="c"] # same, but even + worse as .SD is copied for each group[] +[132] [133] +Overfull \hbox (17.35712pt too wide) in paragraph at lines 6511--6512 +\T1/ptm/m/n/10 in use. Cur-rently, it is just the list vec-tor of col-umn point +-ers that is over-allocated (i.e. []\T1/zi4/m/n/10 truelength(DT)[]\T1/ptm/m/n/ +10 ), +[134] [135] [136] +Overfull \hbox (12.75021pt too wide) in paragraph at lines 6607--6607 + []\T1/zi4/m/n/9 # convert the remaining using \TS1/zi4/m/n/9 '\T1/zi4/m/n/9 ty +pe.convert(x, as.is=TRUE)\TS1/zi4/m/n/9 ' \T1/zi4/m/n/9 (i.e. what type.convert +=TRUE does)[] + +Overfull \hbox (26.25941pt too wide) in paragraph at lines 6608--6608 + []\T1/zi4/m/n/9 DT[, tstrsplit(v, " ", type.convert=list(as.IDate=4L, function +(x) type.convert(x, as.is=TRUE)))][] + +Overfull \hbox (48.92793pt too wide) in paragraph at lines 6650--6653 +[]\T1/ptm/m/n/10 By de-fault the func-tion uses our GitLab-hosted R repos-i-tor +y at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data.table[]\T1/ptm/m/n/10 . + + +Overfull \hbox (144.81755pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 We also pub-lish bleed-ing edge ver-sion of the pack-age on GitH +ub-hosted R repos-i-tory at []\T1/zi4/m/n/10 https://Rdatatable.gitlab.io/data. +table + +Overfull \hbox (66.05753pt too wide) in paragraph at lines 6650--6653 +\T1/ptm/m/n/10 There are also other repos-i-to-ries main-tained by R com-mu-nit +y, for ex-am-ple []\T1/zi4/m/n/10 https://rdatatable.r-universe.dev[]\T1/ptm/m/ +n/10 . +[137] (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.ind [138] + +LaTeX Font Warning: Font shape `T1/zi4/m/it' undefined +(Font) using `T1/zi4/m/n' instead on input line 71. + +[139] [140] [141] [142] [143]) (/tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4/Rd2.aux) + +LaTeX Font Warning: Some font shapes were not available, defaults substituted. + + ) +(see the transcript file for additional information) +pdfTeX warning (dest): name{Rfn.install.packages} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.type.convert} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.try} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.unsetenv} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.object.size} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.objects} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.ls} has been referenced but does not exist, rep +laced by a fixed one + + +pdfTeX warning (dest): name{Rfn.eval} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.name} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.call} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.split.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort.list} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.sort} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.mean} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.rle} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.print.default} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.getS3method} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.grep} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.merge.data.frame} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::grepl} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tail} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.head} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.NROW} has been referenced but does not exist, r +eplaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.DateTimeClasses} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.strptime} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.POSIXct} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.Date} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.round} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.table} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.write.csv} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.options} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.yaml} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.Sys.setlocale} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.url} has been referenced but does not exist, re +placed by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv} has been referenced but does not exis +t, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.system} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.tempdir} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.download.file} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::write.csv} has been referenced but does +not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.base::tempdir} has been referenced but does not + exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.yaml.load} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.make.names} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.utils::read.csv} has been referenced but does n +ot exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.path.expand} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.POSIXct} has been referenced but does not exist +, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.delim\(\)} has been referenced but does no +t exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.read.csv\(\)} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.storage.mode} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.unique.data.frame} has been referenced but does + not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn..Rpcent.in.Rpcent.} has been referenced but doe +s not exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.match} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.charmatch} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.array} has been referenced but does not exist, +replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.matrix} has been referenced but does not e +xist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.format} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.as.vector} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.integer64} has been referenced but does not exi +st, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.is.numeric} has been referenced but does not ex +ist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.bquote} has been referenced but does not exist, + replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.[.data.frame} has been referenced but does not +exist, replaced by a fixed one + + +pdfTeX warning (dest): name{Rfn.data.frame} has been referenced but does not ex +ist, replaced by a fixed one + + +Output written on Rd2.pdf (143 pages, 506761 bytes). +Transcript written on Rd2.log. +Saving output to ‘data.table-manual.pdf’ ... +Done +You may want to clean up by 'rm -Rf /tmp/RtmpaKSm5I/Rd2pdf29b613441c0f4' diff --git a/..Rcheck/data.table-Ex.Rout b/..Rcheck/data.table-Ex.Rout new file mode 100644 index 0000000000..dabcf0698c --- /dev/null +++ b/..Rcheck/data.table-Ex.Rout @@ -0,0 +1,7153 @@ + +R version 4.3.3 (2024-02-29) -- "Angel Food Cake" +Copyright (C) 2024 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. + + Natural language support but running in an English locale + +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. + +> pkgname <- "data.table" +> source(file.path(R.home("share"), "R", "examples-header.R")) +> options(warn = 1) +> library('data.table') +> +> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') +> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') +> cleanEx() +> nameEx("IDateTime") +> ### * IDateTime +> +> flush(stderr()); flush(stdout()) +> +> ### Name: IDateTime +> ### Title: Integer based date class +> ### Aliases: IDate as.IDate ITime as.ITime IDateTime as.character.ITime +> ### as.Date.IDate as.IDate.Date as.IDate.default as.ITime.character +> ### as.ITime.default as.ITime.POSIXlt as.ITime.times as.list.IDate +> ### as.POSIXct.IDate as.POSIXct.ITime as.POSIXlt.ITime c.IDate c.ITime +> ### format.ITime IDateTime.default mean.IDate mean.ITime print.ITime +> ### rep.IDate rep.ITime round.IDate round.ITime trunc.ITime seq.IDate +> ### seq.ITime second minute hour yday wday mday week isoweek month +> ### quarter year yearmon yearqtr IDate-class ITime-class +> ### Keywords: utilities +> +> ### ** Examples +> +> +> # create IDate: +> (d <- as.IDate("2001-01-01")) +[1] "2001-01-01" +> +> # S4 coercion also works +> identical(as.IDate("2001-01-01"), methods::as("2001-01-01", "IDate")) +[1] TRUE +> +> # create ITime: +> (t <- as.ITime("10:45")) +[1] "10:45:00" +> +> # S4 coercion also works +> identical(as.ITime("10:45"), methods::as("10:45", "ITime")) +[1] TRUE +> +> (t <- as.ITime("10:45:04")) +[1] "10:45:04" +> +> (t <- as.ITime("10:45:04", format = "%H:%M:%S")) +[1] "10:45:04" +> +> as.POSIXct("2001-01-01") + as.ITime("10:45") +[1] "2001-01-01 10:45:00 IST" +> +> datetime <- seq(as.POSIXct("2001-01-01"), as.POSIXct("2001-01-03"), by = "5 hour") +> (af <- data.table(IDateTime(datetime), a = rep(1:2, 5), key = c("a", "idate", "itime"))) +Key: + idate itime a + + 1: 2001-01-01 00:00:00 1 + 2: 2001-01-01 10:00:00 1 + 3: 2001-01-01 20:00:00 1 + 4: 2001-01-02 06:00:00 1 + 5: 2001-01-02 16:00:00 1 + 6: 2001-01-01 05:00:00 2 + 7: 2001-01-01 15:00:00 2 + 8: 2001-01-02 01:00:00 2 + 9: 2001-01-02 11:00:00 2 +10: 2001-01-02 21:00:00 2 +> +> af[, mean(a), by = "itime"] + itime V1 + + 1: 00:00:00 1 + 2: 10:00:00 1 + 3: 20:00:00 1 + 4: 06:00:00 1 + 5: 16:00:00 1 + 6: 05:00:00 2 + 7: 15:00:00 2 + 8: 01:00:00 2 + 9: 11:00:00 2 +10: 21:00:00 2 +> af[, mean(a), by = list(hour = hour(itime))] + hour V1 + + 1: 0 1 + 2: 10 1 + 3: 20 1 + 4: 6 1 + 5: 16 1 + 6: 5 2 + 7: 15 2 + 8: 1 2 + 9: 11 2 +10: 21 2 +> af[, mean(a), by = list(wday = factor(weekdays(idate)))] + wday V1 + +1: Monday 1.4 +2: Tuesday 1.6 +> af[, mean(a), by = list(wday = wday(idate))] + wday V1 + +1: 2 1.4 +2: 3 1.6 +> +> as.POSIXct(af$idate) + [1] "2001-01-01 UTC" "2001-01-01 UTC" "2001-01-01 UTC" "2001-01-02 UTC" + [5] "2001-01-02 UTC" "2001-01-01 UTC" "2001-01-01 UTC" "2001-01-02 UTC" + [9] "2001-01-02 UTC" "2001-01-02 UTC" +> as.POSIXct(af$idate, time = af$itime) + [1] "2001-01-01 00:00:00 UTC" "2001-01-01 10:00:00 UTC" + [3] "2001-01-01 20:00:00 UTC" "2001-01-02 06:00:00 UTC" + [5] "2001-01-02 16:00:00 UTC" "2001-01-01 05:00:00 UTC" + [7] "2001-01-01 15:00:00 UTC" "2001-01-02 01:00:00 UTC" + [9] "2001-01-02 11:00:00 UTC" "2001-01-02 21:00:00 UTC" +> as.POSIXct(af$idate, af$itime) + [1] "2001-01-01 00:00:00 UTC" "2001-01-01 10:00:00 UTC" + [3] "2001-01-01 20:00:00 UTC" "2001-01-02 06:00:00 UTC" + [5] "2001-01-02 16:00:00 UTC" "2001-01-01 05:00:00 UTC" + [7] "2001-01-01 15:00:00 UTC" "2001-01-02 01:00:00 UTC" + [9] "2001-01-02 11:00:00 UTC" "2001-01-02 21:00:00 UTC" +> as.POSIXct(af$idate, time = af$itime, tz = "GMT") + [1] "2001-01-01 00:00:00 GMT" "2001-01-01 10:00:00 GMT" + [3] "2001-01-01 20:00:00 GMT" "2001-01-02 06:00:00 GMT" + [5] "2001-01-02 16:00:00 GMT" "2001-01-01 05:00:00 GMT" + [7] "2001-01-01 15:00:00 GMT" "2001-01-02 01:00:00 GMT" + [9] "2001-01-02 11:00:00 GMT" "2001-01-02 21:00:00 GMT" +> +> as.POSIXct(af$itime, af$idate) + [1] "2001-01-01 00:00:00 UTC" "2001-01-01 10:00:00 UTC" + [3] "2001-01-01 20:00:00 UTC" "2001-01-02 06:00:00 UTC" + [5] "2001-01-02 16:00:00 UTC" "2001-01-01 05:00:00 UTC" + [7] "2001-01-01 15:00:00 UTC" "2001-01-02 01:00:00 UTC" + [9] "2001-01-02 11:00:00 UTC" "2001-01-02 21:00:00 UTC" +> as.POSIXct(af$itime) # uses today's date + [1] "2024-12-23 00:00:00 UTC" "2024-12-23 10:00:00 UTC" + [3] "2024-12-23 20:00:00 UTC" "2024-12-23 06:00:00 UTC" + [5] "2024-12-23 16:00:00 UTC" "2024-12-23 05:00:00 UTC" + [7] "2024-12-23 15:00:00 UTC" "2024-12-23 01:00:00 UTC" + [9] "2024-12-23 11:00:00 UTC" "2024-12-23 21:00:00 UTC" +> +> (seqdates <- seq(as.IDate("2001-01-01"), as.IDate("2001-08-03"), by = "3 weeks")) + [1] "2001-01-01" "2001-01-22" "2001-02-12" "2001-03-05" "2001-03-26" + [6] "2001-04-16" "2001-05-07" "2001-05-28" "2001-06-18" "2001-07-09" +[11] "2001-07-30" +> round(seqdates, "months") + [1] "2001-01-01" "2001-01-01" "2001-02-01" "2001-03-01" "2001-03-01" + [6] "2001-04-01" "2001-05-01" "2001-05-01" "2001-06-01" "2001-07-01" +[11] "2001-07-01" +> +> (seqtimes <- seq(as.ITime("07:00"), as.ITime("08:00"), by = 20)) + [1] "07:00:00" "07:00:20" "07:00:40" "07:01:00" "07:01:20" "07:01:40" + [7] "07:02:00" "07:02:20" "07:02:40" "07:03:00" "07:03:20" "07:03:40" + [13] "07:04:00" "07:04:20" "07:04:40" "07:05:00" "07:05:20" "07:05:40" + [19] "07:06:00" "07:06:20" "07:06:40" "07:07:00" "07:07:20" "07:07:40" + [25] "07:08:00" "07:08:20" "07:08:40" "07:09:00" "07:09:20" "07:09:40" + [31] "07:10:00" "07:10:20" "07:10:40" "07:11:00" "07:11:20" "07:11:40" + [37] "07:12:00" "07:12:20" "07:12:40" "07:13:00" "07:13:20" "07:13:40" + [43] "07:14:00" "07:14:20" "07:14:40" "07:15:00" "07:15:20" "07:15:40" + [49] "07:16:00" "07:16:20" "07:16:40" "07:17:00" "07:17:20" "07:17:40" + [55] "07:18:00" "07:18:20" "07:18:40" "07:19:00" "07:19:20" "07:19:40" + [61] "07:20:00" "07:20:20" "07:20:40" "07:21:00" "07:21:20" "07:21:40" + [67] "07:22:00" "07:22:20" "07:22:40" "07:23:00" "07:23:20" "07:23:40" + [73] "07:24:00" "07:24:20" "07:24:40" "07:25:00" "07:25:20" "07:25:40" + [79] "07:26:00" "07:26:20" "07:26:40" "07:27:00" "07:27:20" "07:27:40" + [85] "07:28:00" "07:28:20" "07:28:40" "07:29:00" "07:29:20" "07:29:40" + [91] "07:30:00" "07:30:20" "07:30:40" "07:31:00" "07:31:20" "07:31:40" + [97] "07:32:00" "07:32:20" "07:32:40" "07:33:00" "07:33:20" "07:33:40" +[103] "07:34:00" "07:34:20" "07:34:40" "07:35:00" "07:35:20" "07:35:40" +[109] "07:36:00" "07:36:20" "07:36:40" "07:37:00" "07:37:20" "07:37:40" +[115] "07:38:00" "07:38:20" "07:38:40" "07:39:00" "07:39:20" "07:39:40" +[121] "07:40:00" "07:40:20" "07:40:40" "07:41:00" "07:41:20" "07:41:40" +[127] "07:42:00" "07:42:20" "07:42:40" "07:43:00" "07:43:20" "07:43:40" +[133] "07:44:00" "07:44:20" "07:44:40" "07:45:00" "07:45:20" "07:45:40" +[139] "07:46:00" "07:46:20" "07:46:40" "07:47:00" "07:47:20" "07:47:40" +[145] "07:48:00" "07:48:20" "07:48:40" "07:49:00" "07:49:20" "07:49:40" +[151] "07:50:00" "07:50:20" "07:50:40" "07:51:00" "07:51:20" "07:51:40" +[157] "07:52:00" "07:52:20" "07:52:40" "07:53:00" "07:53:20" "07:53:40" +[163] "07:54:00" "07:54:20" "07:54:40" "07:55:00" "07:55:20" "07:55:40" +[169] "07:56:00" "07:56:20" "07:56:40" "07:57:00" "07:57:20" "07:57:40" +[175] "07:58:00" "07:58:20" "07:58:40" "07:59:00" "07:59:20" "07:59:40" +[181] "08:00:00" +> round(seqtimes, "hours") + [1] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [7] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [13] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [19] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [25] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [31] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [37] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [43] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [49] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [55] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [61] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [67] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [73] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [79] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [85] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [91] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" + [97] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[103] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[109] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[115] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[121] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[127] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[133] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[139] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[145] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[151] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[157] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[163] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[169] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[175] "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" "08:00:00" +[181] "08:00:00" +> trunc(seqtimes, "hours") + [1] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [7] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [13] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [19] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [25] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [31] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [37] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [43] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [49] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [55] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [61] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [67] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [73] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [79] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [85] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [91] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" + [97] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[103] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[109] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[115] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[121] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[127] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[133] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[139] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[145] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[151] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[157] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[163] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[169] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[175] "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" "07:00:00" +[181] "08:00:00" +> +> +> +> +> cleanEx() +> nameEx("J") +> ### * J +> +> flush(stderr()); flush(stdout()) +> +> ### Name: J +> ### Title: Creates a join 'data.table' +> ### Aliases: J CJ SJ +> ### Keywords: data +> +> ### ** Examples +> +> DT = data.table(A=5:1, B=letters[5:1]) +> setkey(DT, B) # reorders table and marks it sorted +> DT[J("b")] # returns the 2nd row +Key: + A B + +1: 2 b +> DT[list("b")] # same +Key: + A B + +1: 2 b +> DT[.("b")] # same using the dot alias for list +Key: + A B + +1: 2 b +> +> # CJ usage examples +> CJ(c(5, NA, 1), c(1, 3, 2)) # sorted and keyed data.table +Key: + V1 V2 + +1: NA 1 +2: NA 2 +3: NA 3 +4: 1 1 +5: 1 2 +6: 1 3 +7: 5 1 +8: 5 2 +9: 5 3 +> do.call(CJ, list(c(5, NA, 1), c(1, 3, 2))) # same as above +Key: + V1 V2 + +1: NA 1 +2: NA 2 +3: NA 3 +4: 1 1 +5: 1 2 +6: 1 3 +7: 5 1 +8: 5 2 +9: 5 3 +> CJ(c(5, NA, 1), c(1, 3, 2), sorted=FALSE) # same order as input, unkeyed + V1 V2 + +1: 5 1 +2: 5 3 +3: 5 2 +4: NA 1 +5: NA 3 +6: NA 2 +7: 1 1 +8: 1 3 +9: 1 2 +> # use for 'unique=' argument +> x = c(1, 1, 2) +> y = c(4, 6, 4) +> CJ(x, y) # output columns are automatically named 'x' and 'y' +Key: + x y + +1: 1 4 +2: 1 4 +3: 1 4 +4: 1 4 +5: 1 6 +6: 1 6 +7: 2 4 +8: 2 4 +9: 2 6 +> CJ(x, y, unique=TRUE) # unique(x) and unique(y) are computed automatically +Key: + x y + +1: 1 4 +2: 1 6 +3: 2 4 +4: 2 6 +> CJ(x, y, sorted = FALSE) # retain input order for y + x y + +1: 1 4 +2: 1 6 +3: 1 4 +4: 1 4 +5: 1 6 +6: 1 4 +7: 2 4 +8: 2 6 +9: 2 4 +> +> +> +> cleanEx() +> nameEx("address") +> ### * address +> +> flush(stderr()); flush(stdout()) +> +> ### Name: address +> ### Title: Address in RAM of a variable +> ### Aliases: address +> ### Keywords: data +> +> ### ** Examples +> +> x=1 +> address(x) +[1] "0x630862b1c888" +> +> +> +> cleanEx() +> nameEx("all.equal.data.table") +> ### * all.equal.data.table +> +> flush(stderr()); flush(stdout()) +> +> ### Name: all.equal +> ### Title: Equality Test Between Two Data Tables +> ### Aliases: all.equal all.equal.data.table +> +> ### ** Examples +> +> dt1 <- data.table(A = letters[1:10], X = 1:10, key = "A") +> dt2 <- data.table(A = letters[5:14], Y = 1:10, key = "A") +> isTRUE(all.equal(dt1, dt1)) +[1] TRUE +> is.character(all.equal(dt1, dt2)) +[1] TRUE +> +> # ignore.col.order +> x <- copy(dt1) +> y <- dt1[, .(X, A)] +> all.equal(x, y) +[1] "Different column order" +> all.equal(x, y, ignore.col.order = TRUE) +[1] TRUE +> +> # ignore.row.order +> x <- setkeyv(copy(dt1), NULL) +> y <- dt1[sample(nrow(dt1))] +> all.equal(x, y) +[1] "Column 'A': 10 string mismatches" +> all.equal(x, y, ignore.row.order = TRUE) +[1] TRUE +> +> # check.attributes +> x = copy(dt1) +> y = setkeyv(copy(dt1), NULL) +> all.equal(x, y) +[1] "Datasets have different keys. 'target': [A]. 'current': has no key." +> all.equal(x, y, check.attributes = FALSE) +[1] TRUE +> x = data.table(1L) +> y = 1L +> all.equal(x, y) +[1] "target is data.table, current is numeric" +> all.equal(x, y, check.attributes = FALSE) +[1] TRUE +> +> # trim.levels +> x <- data.table(A = factor(letters[1:10])[1:4]) # 10 levels +> y <- data.table(A = factor(letters[1:5])[1:4]) # 5 levels +> all.equal(x, y, trim.levels = FALSE) +[1] "Column 'A': Levels not identical. No attempt to refactor because trim.levels is FALSE" +> all.equal(x, y, trim.levels = FALSE, check.attributes = FALSE) +[1] "Column 'A': Levels not identical. No attempt to refactor because trim.levels is FALSE" +> all.equal(x, y) +[1] TRUE +> +> +> +> cleanEx() +> nameEx("as.data.table") +> ### * as.data.table +> +> flush(stderr()); flush(stdout()) +> +> ### Name: as.data.table +> ### Title: Coerce to data.table +> ### Aliases: as.data.table as.data.table.array as.data.table.matrix +> ### as.data.table.list as.data.table.data.frame as.data.table.data.table +> ### as.data.table.factor as.data.table.ordered as.data.table.integer +> ### as.data.table.numeric as.data.table.logical as.data.table.character +> ### as.data.table.Date is.data.table +> ### Keywords: data +> +> ### ** Examples +> +> nn = c(a=0.1, b=0.2, c=0.3, d=0.4) +> as.data.table(nn) + nn + +1: 0.1 +2: 0.2 +3: 0.3 +4: 0.4 +> as.data.table(nn, keep.rownames=TRUE) + rn nn + +1: a 0.1 +2: b 0.2 +3: c 0.3 +4: d 0.4 +> as.data.table(nn, keep.rownames="rownames") + rownames nn + +1: a 0.1 +2: b 0.2 +3: c 0.3 +4: d 0.4 +> +> # char object not converted to factor +> cc = c(X="a", Y="b", Z="c") +> as.data.table(cc) + cc + +1: a +2: b +3: c +> as.data.table(cc, keep.rownames=TRUE) + rn cc + +1: X a +2: Y b +3: Z c +> as.data.table(cc, keep.rownames="rownames") + rownames cc + +1: X a +2: Y b +3: Z c +> +> mm = matrix(1:4, ncol=2, dimnames=list(c("r1", "r2"), c("c1", "c2"))) +> as.data.table(mm) + c1 c2 + +1: 1 3 +2: 2 4 +> as.data.table(mm, keep.rownames=TRUE) + rn c1 c2 + +1: r1 1 3 +2: r2 2 4 +> as.data.table(mm, keep.rownames="rownames") + rownames c1 c2 + +1: r1 1 3 +2: r2 2 4 +> as.data.table(mm, key="c1") +Key: + c1 c2 + +1: 1 3 +2: 2 4 +> +> ll = list(a=1:2, b=3:4) +> as.data.table(ll) + a b + +1: 1 3 +2: 2 4 +> as.data.table(ll, keep.rownames=TRUE) + a b + +1: 1 3 +2: 2 4 +> as.data.table(ll, keep.rownames="rownames") + a b + +1: 1 3 +2: 2 4 +> +> DF = data.frame(x=rep(c("x","y","z"),each=2), y=c(1,3,6), row.names=LETTERS[1:6]) +> as.data.table(DF) + x y + +1: x 1 +2: x 3 +3: y 6 +4: y 1 +5: z 3 +6: z 6 +> as.data.table(DF, keep.rownames=TRUE) + rn x y + +1: A x 1 +2: B x 3 +3: C y 6 +4: D y 1 +5: E z 3 +6: F z 6 +> as.data.table(DF, keep.rownames="rownames") + rownames x y + +1: A x 1 +2: B x 3 +3: C y 6 +4: D y 1 +5: E z 3 +6: F z 6 +> +> DT = data.table(x=rep(c("x","y","z"),each=2), y=c(1:6)) +> as.data.table(DT) + x y + +1: x 1 +2: x 2 +3: y 3 +4: y 4 +5: z 5 +6: z 6 +> as.data.table(DT, key='x') + x y + +1: x 1 +2: x 2 +3: y 3 +4: y 4 +5: z 5 +6: z 6 +> +> ar = rnorm(27) +> ar[sample(27, 15)] = NA +> dim(ar) = c(3L,3L,3L) +> as.data.table(ar) +Key: + V1 V2 V3 value + + 1: 1 1 1 -0.62645381 + 2: 1 2 1 1.59528080 + 3: 1 3 2 -0.04493361 + 4: 2 1 2 1.51178117 + 5: 2 2 1 0.32950777 + 6: 2 3 1 0.73832471 + 7: 2 3 2 -0.01619026 + 8: 2 3 3 -0.05612874 + 9: 3 1 1 -0.83562861 +10: 3 1 2 0.38984324 +11: 3 1 3 0.91897737 +12: 3 3 1 0.57578135 +> +> +> +> cleanEx() +> nameEx("as.data.table.xts") +> ### * as.data.table.xts +> +> flush(stderr()); flush(stdout()) +> +> ### Name: as.data.table.xts +> ### Title: Efficient xts to as.data.table conversion +> ### Aliases: as.data.table.xts +> +> ### ** Examples +> +> if (requireNamespace("xts", quietly = TRUE)) { ++ data(sample_matrix, package = "xts") ++ sample.xts <- xts::as.xts(sample_matrix) # xts might not be attached on search path ++ # print head of xts ++ print(head(sample.xts)) ++ # print data.table ++ print(as.data.table(sample.xts)) ++ } + Open High Low Close +2007-01-02 50.03978 50.11778 49.95041 50.11778 +2007-01-03 50.23050 50.42188 50.23050 50.39767 +2007-01-04 50.42096 50.42096 50.26414 50.33236 +2007-01-05 50.37347 50.37347 50.22103 50.33459 +2007-01-06 50.24433 50.24433 50.11121 50.18112 +2007-01-07 50.13211 50.21561 49.99185 49.99185 + index Open High Low Close + + 1: 2007-01-02 50.03978 50.11778 49.95041 50.11778 + 2: 2007-01-03 50.23050 50.42188 50.23050 50.39767 + 3: 2007-01-04 50.42096 50.42096 50.26414 50.33236 + 4: 2007-01-05 50.37347 50.37347 50.22103 50.33459 + 5: 2007-01-06 50.24433 50.24433 50.11121 50.18112 + --- +176: 2007-06-26 47.44300 47.61611 47.44300 47.61611 +177: 2007-06-27 47.62323 47.71673 47.60015 47.62769 +178: 2007-06-28 47.67604 47.70460 47.57241 47.60716 +179: 2007-06-29 47.63629 47.77563 47.61733 47.66471 +180: 2007-06-30 47.67468 47.94127 47.67468 47.76719 +> +> +> +> cleanEx() +> nameEx("as.matrix") +> ### * as.matrix +> +> flush(stderr()); flush(stdout()) +> +> ### Name: as.matrix +> ### Title: Convert a data.table to a matrix +> ### Aliases: as.matrix as.matrix.data.table +> ### Keywords: array +> +> ### ** Examples +> +> DT <- data.table(A = letters[1:10], X = 1:10, Y = 11:20) +> as.matrix(DT) # character matrix + A X Y + [1,] "a" " 1" "11" + [2,] "b" " 2" "12" + [3,] "c" " 3" "13" + [4,] "d" " 4" "14" + [5,] "e" " 5" "15" + [6,] "f" " 6" "16" + [7,] "g" " 7" "17" + [8,] "h" " 8" "18" + [9,] "i" " 9" "19" +[10,] "j" "10" "20" +> as.matrix(DT, rownames = "A") + X Y +a 1 11 +b 2 12 +c 3 13 +d 4 14 +e 5 15 +f 6 16 +g 7 17 +h 8 18 +i 9 19 +j 10 20 +> as.matrix(DT, rownames = 1) + X Y +a 1 11 +b 2 12 +c 3 13 +d 4 14 +e 5 15 +f 6 16 +g 7 17 +h 8 18 +i 9 19 +j 10 20 +> as.matrix(DT, rownames = TRUE) + X Y +a 1 11 +b 2 12 +c 3 13 +d 4 14 +e 5 15 +f 6 16 +g 7 17 +h 8 18 +i 9 19 +j 10 20 +> +> setkey(DT, A) +> as.matrix(DT, rownames = TRUE) + X Y +a 1 11 +b 2 12 +c 3 13 +d 4 14 +e 5 15 +f 6 16 +g 7 17 +h 8 18 +i 9 19 +j 10 20 +> +> +> +> cleanEx() +> nameEx("as.xts.data.table") +> ### * as.xts.data.table +> +> flush(stderr()); flush(stdout()) +> +> ### Name: as.xts.data.table +> ### Title: Efficient data.table to xts conversion +> ### Aliases: as.xts.data.table +> +> ### ** Examples +> +> if (requireNamespace("xts", quietly = TRUE)) { ++ sample.dt <- data.table(date = as.Date((Sys.Date()-999):Sys.Date(),origin="1970-01-01"), ++ quantity = sample(10:50,1000,TRUE), ++ value = sample(100:1000,1000,TRUE)) ++ # print data.table ++ print(sample.dt) ++ # print head of xts ++ print(head(as.xts.data.table(sample.dt))) # xts might not be attached on search path ++ } + date quantity value + + 1: 2022-03-30 13 757 + 2: 2022-03-31 48 370 + 3: 2022-04-01 10 422 + 4: 2022-04-02 43 374 + 5: 2022-04-03 32 922 + --- + 996: 2024-12-19 40 767 + 997: 2024-12-20 22 267 + 998: 2024-12-21 50 919 + 999: 2024-12-22 12 557 +1000: 2024-12-23 20 332 + quantity value +2022-03-30 13 757 +2022-03-31 48 370 +2022-04-01 10 422 +2022-04-02 43 374 +2022-04-03 32 922 +2022-04-04 23 903 +> +> +> +> cleanEx() +> nameEx("assign") +> ### * assign +> +> flush(stderr()); flush(stdout()) +> +> ### Name: := +> ### Title: Assignment by reference +> ### Aliases: := set let +> ### Keywords: data +> +> ### ** Examples +> +> DT = data.table(a = LETTERS[c(3L,1:3)], b = 4:7) +> DT[, c := 8] # add a numeric column, 8 for all rows +> DT[, d := 9L] # add an integer column, 9L for all rows +> DT[, c := NULL] # remove column c +> DT[2, d := -8L] # subassign by reference to d; 2nd row is -8L now +> DT # DT changed by reference + a b d + +1: C 4 9 +2: A 5 -8 +3: B 6 9 +4: C 7 9 +> DT[2, d := 10L][] # shorthand for update and print + a b d + +1: C 4 9 +2: A 5 10 +3: B 6 9 +4: C 7 9 +> +> DT[b > 4, b := d * 2L] # subassign to b with d*2L on those rows where b > 4 is TRUE +> DT[b > 4][, b := d * 2L] # different from above. [, := ] is performed on the subset +> # which is an new (ephemeral) data.table. Result needs to be +> # assigned to a variable (using `<-`). +> +> DT[, e := mean(d), by = a] # add new column by group by reference +> DT["A", b := 0L, on = "a"] # ad-hoc update of column b for group "A" using +> # joins-as-subsets with binary search and 'on=' +> # same as above but using keys +> setkey(DT, a) +> DT["A", b := 0L] # binary search for group "A" and set column b using keys +> DT["B", f := mean(d)] # subassign to new column, NA initialized +> +> # Adding multiple columns +> ## by name +> DT[ , c('sin_d', 'log_e', 'cos_d') := ++ .(sin(d), log(e), cos(d))] +> ## by patterned name +> DT[ , paste(c('sin', 'cos'), 'b', sep = '_') := ++ .(sin(b), cos(b))] +> ## using lapply & .SD +> DT[ , paste0('tan_', c('b', 'd', 'e')) := ++ lapply(.SD, tan), .SDcols = c('b', 'd', 'e')] +> ## using forced evaluation to disambiguate a vector of names +> ## and overwrite existing columns with their squares +> sq_cols = c('b', 'd', 'e') +> DT[ , (sq_cols) := lapply(.SD, `^`, 2L), .SDcols = sq_cols] +> ## by integer (NB: for robustness, it is not recommended +> ## to use explicit integers to update/define columns) +> DT[ , c(2L, 3L, 4L) := .(sqrt(b), sqrt(d), sqrt(e))] +> ## by implicit integer +> DT[ , grep('a$', names(DT)) := tolower(a)] +> ## by implicit integer, using forced evaluation +> sq_col_idx = grep('d$', names(DT)) +> DT[ , (sq_col_idx) := lapply(.SD, dnorm), ++ .SDcols = sq_col_idx] +> +> # Examples using `set` function +> ## Set value for single cell +> set(DT, 1L, "b", 10L) +> ## Set values for multiple columns in a specific row +> set(DT, 2L, c("b", "d"), list(20L, 30L)) +> ## Set values by column indices +> set(DT, 3L, c(2L, 4L), list(40L, 50L)) +> ## Set value for an entire column without specifying rows +> set(DT, j = "b", value = 100L) +> set(DT, NULL, "b", 100L) # equivalent +> ## Set values for multiple columns without specifying rows +> set(DT, j = c("b", "d"), value = list(200L, 300L)) +> ## Set values for multiple columns with multiple specified rows. +> set(DT, c(1L, 3L), c("b", "d"), value = list(500L, 800L)) +> +> ## Not run: +> ##D # Speed example: +> ##D +> ##D m = matrix(1, nrow = 2e6L, ncol = 100L) +> ##D DF = as.data.frame(m) +> ##D DT = as.data.table(m) +> ##D +> ##D system.time(for (i in 1:1000) DF[i, 1] = i) +> ##D # 15.856 seconds +> ##D system.time(for (i in 1:1000) DT[i, V1 := i]) +> ##D # 0.279 seconds (57 times faster) +> ##D system.time(for (i in 1:1000) set(DT, i, 1L, i)) +> ##D # 0.002 seconds (7930 times faster, overhead of [.data.table is avoided) +> ##D +> ##D # However, normally, we call [.data.table *once* on *large* data, not many times on small data. +> ##D # The above is to demonstrate overhead, not to recommend looping in this way. But the option +> ##D # of set() is there if you need it. +> ## End(Not run) +> +> +> +> +> cleanEx() +> nameEx("between") +> ### * between +> +> flush(stderr()); flush(stdout()) +> +> ### Name: between +> ### Title: Convenience functions for range subsets. +> ### Aliases: between %between% inrange %inrange% +> ### Keywords: data +> +> ### ** Examples +> +> X = data.table(a=1:5, b=6:10, c=c(5:1)) +> X[b %between% c(7,9)] + a b c + +1: 2 7 4 +2: 3 8 3 +3: 4 9 2 +> X[between(b, 7, 9)] # same as above + a b c + +1: 2 7 4 +2: 3 8 3 +3: 4 9 2 +> # NEW feature in v1.9.8, vectorised between +> X[c %between% list(a,b)] + a b c + +1: 1 6 5 +2: 2 7 4 +3: 3 8 3 +> X[between(c, a, b)] # same as above + a b c + +1: 1 6 5 +2: 2 7 4 +3: 3 8 3 +> X[between(c, a, b, incbounds=FALSE)] # open interval + a b c + +1: 1 6 5 +2: 2 7 4 +> +> # inrange() +> Y = data.table(a=c(8,3,10,7,-10), val=runif(5)) +> range = data.table(start = 1:5, end = 6:10) +> Y[a %inrange% range] + a val + +1: 8 0.2655087 +2: 3 0.3721239 +3: 10 0.5728534 +4: 7 0.9082078 +> Y[inrange(a, range$start, range$end)] # same as above + a val + +1: 8 0.2655087 +2: 3 0.3721239 +3: 10 0.5728534 +4: 7 0.9082078 +> Y[inrange(a, range$start, range$end, incbounds=FALSE)] # open interval + a val + +1: 8 0.2655087 +2: 3 0.3721239 +3: 7 0.9082078 +> +> +> +> cleanEx() +> nameEx("chmatch") +> ### * chmatch +> +> flush(stderr()); flush(stdout()) +> +> ### Name: chmatch +> ### Title: Faster match of character vectors +> ### Aliases: chmatch %chin% chorder chgroup +> ### Keywords: data +> +> ### ** Examples +> +> # Please type 'example(chmatch)' to run this and see timings on your machine +> +> N = 1e5 +> # N is set small here (1e5) to reduce runtime because every day CRAN runs and checks +> # all documentation examples in addition to the package's test suite. +> # The comments here apply when N has been changed to 1e8 and were run on 2018-05-13 +> # with R 3.5.0 and data.table 1.11.2. +> +> u = as.character(as.hexmode(1:10000)) +> y = sample(u,N,replace=TRUE) +> x = sample(u) +> # With N=1e8 ... +> system.time(a <- match(x,y)) # 4.6s + user system elapsed + 0.003 0.001 0.004 +> system.time(b <- chmatch(x,y)) # 1.8s + user system elapsed + 0.001 0.000 0.000 +> identical(a,b) +[1] TRUE +> +> system.time(a <- x %in% y) # 4.5s + user system elapsed + 0.004 0.000 0.005 +> system.time(b <- x %chin% y) # 1.7s + user system elapsed + 0.000 0.000 0.001 +> identical(a,b) +[1] TRUE +> +> # Different example with more unique strings ... +> u = as.character(as.hexmode(1:(N/10))) +> y = sample(u,N,replace=TRUE) +> x = sample(u,N,replace=TRUE) +> system.time(a <- match(x,y)) # 46s + user system elapsed + 0.004 0.001 0.005 +> system.time(b <- chmatch(x,y)) # 16s + user system elapsed + 0.002 0.000 0.002 +> identical(a,b) +[1] TRUE +> +> +> +> cleanEx() +> nameEx("coalesce") +> ### * coalesce +> +> flush(stderr()); flush(stdout()) +> +> ### Name: fcoalesce +> ### Title: Coalescing missing values +> ### Aliases: fcoalesce setcoalesce +> ### Keywords: data +> +> ### ** Examples +> +> x = c(11L, NA, 13L, NA, 15L, NA) +> y = c(NA, 12L, 5L, NA, NA, NA) +> z = c(11L, NA, 1L, 14L, NA, NA) +> fcoalesce(x, y, z) +[1] 11 12 13 14 15 NA +> fcoalesce(list(x,y,z)) # same +[1] 11 12 13 14 15 NA +> fcoalesce(x, list(y,z)) # same +[1] 11 12 13 14 15 NA +> +> +> +> cleanEx() +> nameEx("copy") +> ### * copy +> +> flush(stderr()); flush(stdout()) +> +> ### Name: copy +> ### Title: Copy an entire object +> ### Aliases: copy +> ### Keywords: data +> +> ### ** Examples +> +> # Type 'example(copy)' to run these at prompt and browse output +> +> DT = data.table(A=5:1,B=letters[5:1]) +> DT2 = copy(DT) # explicit copy() needed to copy a data.table +> setkey(DT2,B) # now just changes DT2 +> identical(DT,DT2) # FALSE. DT and DT2 are now different tables +[1] FALSE +> +> DT = data.table(A=5:1, B=letters[5:1]) +> nm1 = names(DT) +> nm2 = copy(names(DT)) +> DT[, C := 1L] +> identical(nm1, names(DT)) # TRUE, nm1 is also changed by reference +[1] TRUE +> identical(nm2, names(DT)) # FALSE, nm2 is a copy, different from names(DT) +[1] FALSE +> +> +> +> cleanEx() +> nameEx("data.table-class") +> ### * data.table-class +> +> flush(stderr()); flush(stdout()) +> +> ### Name: data.table-class +> ### Title: S4 Definition for data.table +> ### Aliases: class:data.table data.table-class +> ### Keywords: classes methods +> +> ### ** Examples +> +> ## Used in inheritance. +> setClass('SuperDataTable', contains='data.table') +> +> ## Used in a slot +> setClass('Something', representation(x='character', dt='data.table')) +> x <- new("Something", x='check', dt=data.table(a=1:10, b=11:20)) +> +> +> +> cleanEx() +> nameEx("data.table") +> ### * data.table +> +> flush(stderr()); flush(stdout()) +> +> ### Name: data.table-package +> ### Title: Enhanced data.frame +> ### Aliases: data.table-package data.table Ops.data.table is.na.data.table +> ### [.data.table . .( .() .. +> ### Keywords: data +> +> ### ** Examples +> +> ## Not run: +> ##D example(data.table) # to run these examples yourself +> ## End(Not run) +> DF = data.frame(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9) +> DT = data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9) +> DF + x y v +1 b 1 1 +2 b 3 2 +3 b 6 3 +4 a 1 4 +5 a 3 5 +6 a 6 6 +7 c 1 7 +8 c 3 8 +9 c 6 9 +> DT + x y v + +1: b 1 1 +2: b 3 2 +3: b 6 3 +4: a 1 4 +5: a 3 5 +6: a 6 6 +7: c 1 7 +8: c 3 8 +9: c 6 9 +> identical(dim(DT), dim(DF)) # TRUE +[1] TRUE +> identical(DF$a, DT$a) # TRUE +[1] TRUE +> is.list(DF) # TRUE +[1] TRUE +> is.list(DT) # TRUE +[1] TRUE +> +> is.data.frame(DT) # TRUE +[1] TRUE +> +> tables() + NAME NROW NCOL MB COLS KEY +1: DT 9 3 0 x,y,v [NULL] +Total: 0MB using type_size +> +> # basic row subset operations +> DT[2] # 2nd row + x y v + +1: b 3 2 +> DT[3:2] # 3rd and 2nd row + x y v + +1: b 6 3 +2: b 3 2 +> DT[order(x)] # no need for order(DT$x) + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +4: b 1 1 +5: b 3 2 +6: b 6 3 +7: c 1 7 +8: c 3 8 +9: c 6 9 +> DT[order(x), ] # same as above. The ',' is optional + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +4: b 1 1 +5: b 3 2 +6: b 6 3 +7: c 1 7 +8: c 3 8 +9: c 6 9 +> DT[y>2] # all rows where DT$y > 2 + x y v + +1: b 3 2 +2: b 6 3 +3: a 3 5 +4: a 6 6 +5: c 3 8 +6: c 6 9 +> DT[y>2 & v>5] # compound logical expressions + x y v + +1: a 6 6 +2: c 3 8 +3: c 6 9 +> DT[!2:4] # all rows other than 2:4 + x y v + +1: b 1 1 +2: a 3 5 +3: a 6 6 +4: c 1 7 +5: c 3 8 +6: c 6 9 +> DT[-(2:4)] # same + x y v + +1: b 1 1 +2: a 3 5 +3: a 6 6 +4: c 1 7 +5: c 3 8 +6: c 6 9 +> +> # select|compute columns data.table way +> DT[, v] # v column (as vector) +[1] 1 2 3 4 5 6 7 8 9 +> DT[, list(v)] # v column (as data.table) + v + +1: 1 +2: 2 +3: 3 +4: 4 +5: 5 +6: 6 +7: 7 +8: 8 +9: 9 +> DT[, .(v)] # same as above, .() is a shorthand alias to list() + v + +1: 1 +2: 2 +3: 3 +4: 4 +5: 5 +6: 6 +7: 7 +8: 8 +9: 9 +> DT[, sum(v)] # sum of column v, returned as vector +[1] 45 +> DT[, .(sum(v))] # same, but return data.table (column autonamed V1) + V1 + +1: 45 +> DT[, .(sv=sum(v))] # same, but column named "sv" + sv + +1: 45 +> DT[, .(v, v*2)] # return two column data.table, v and v*2 + v V2 + +1: 1 2 +2: 2 4 +3: 3 6 +4: 4 8 +5: 5 10 +6: 6 12 +7: 7 14 +8: 8 16 +9: 9 18 +> +> # subset rows and select|compute data.table way +> DT[2:3, sum(v)] # sum(v) over rows 2 and 3, return vector +[1] 5 +> DT[2:3, .(sum(v))] # same, but return data.table with column V1 + V1 + +1: 5 +> DT[2:3, .(sv=sum(v))] # same, but return data.table with column sv + sv + +1: 5 +> DT[2:5, cat(v, "\n")] # just for j's side effect +2 3 4 5 +NULL +> +> # select columns the data.frame way +> DT[, 2] # 2nd column, returns a data.table always + y + +1: 1 +2: 3 +3: 6 +4: 1 +5: 3 +6: 6 +7: 1 +8: 3 +9: 6 +> colNum = 2 +> DT[, ..colNum] # same, .. prefix conveys one-level-up in calling scope + y + +1: 1 +2: 3 +3: 6 +4: 1 +5: 3 +6: 6 +7: 1 +8: 3 +9: 6 +> DT[["v"]] # same as DT[, v] but faster if called in a loop +[1] 1 2 3 4 5 6 7 8 9 +> +> # grouping operations - j and by +> DT[, sum(v), by=x] # ad hoc by, order of groups preserved in result + x V1 + +1: b 6 +2: a 15 +3: c 24 +> DT[, sum(v), keyby=x] # same, but order the result on by cols +Key: + x V1 + +1: a 15 +2: b 6 +3: c 24 +> DT[, sum(v), by=x, keyby=TRUE] # same, but using sorting flag +Key: + x V1 + +1: a 15 +2: b 6 +3: c 24 +> DT[, sum(v), by=x][order(x)] # same but by chaining expressions together + x V1 + +1: a 15 +2: b 6 +3: c 24 +> +> # fast ad hoc row subsets (subsets as joins) +> DT["a", on="x"] # same as x == "a" but uses binary search (fast) + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> DT["a", on=.(x)] # same, for convenience, no need to quote every column + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> DT[.("a"), on="x"] # same + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> DT[x=="a"] # same, single "==" internally optimised to use binary search (fast) + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> DT[x!="b" | y!=3] # not yet optimized, currently vector scan subset + x y v + +1: b 1 1 +2: b 6 3 +3: a 1 4 +4: a 3 5 +5: a 6 6 +6: c 1 7 +7: c 3 8 +8: c 6 9 +> DT[.("b", 3), on=c("x", "y")] # join on columns x,y of DT; uses binary search (fast) + x y v + +1: b 3 2 +> DT[.("b", 3), on=.(x, y)] # same, but using on=.() + x y v + +1: b 3 2 +> DT[.("b", 1:2), on=c("x", "y")] # no match returns NA + x y v + +1: b 1 1 +2: b 2 NA +> DT[.("b", 1:2), on=.(x, y), nomatch=NULL] # no match row is not returned + x y v + +1: b 1 1 +> DT[.("b", 1:2), on=c("x", "y"), roll=Inf] # locf, nomatch row gets rolled by previous row + x y v + +1: b 1 1 +2: b 2 1 +> DT[.("b", 1:2), on=.(x, y), roll=-Inf] # nocb, nomatch row gets rolled by next row + x y v + +1: b 1 1 +2: b 2 2 +> DT["b", sum(v*y), on="x"] # on rows where DT$x=="b", calculate sum(v*y) +[1] 25 +> +> # all together now +> DT[x!="a", sum(v), by=x] # get sum(v) by "x" for each i != "a" + x V1 + +1: b 6 +2: c 24 +> DT[!"a", sum(v), by=.EACHI, on="x"] # same, but using subsets-as-joins + x V1 + +1: b 6 +2: c 24 +> DT[c("b","c"), sum(v), by=.EACHI, on="x"] # same + x V1 + +1: b 6 +2: c 24 +> DT[c("b","c"), sum(v), by=.EACHI, on=.(x)] # same, using on=.() + x V1 + +1: b 6 +2: c 24 +> +> # joins as subsets +> X = data.table(x=c("c","b"), v=8:7, foo=c(4,2)) +> X + x v foo + +1: c 8 4 +2: b 7 2 +> +> DT[X, on="x"] # right join + x y v i.v foo + +1: c 1 7 8 4 +2: c 3 8 8 4 +3: c 6 9 8 4 +4: b 1 1 7 2 +5: b 3 2 7 2 +6: b 6 3 7 2 +> X[DT, on="x"] # left join + x v foo y i.v + +1: b 7 2 1 1 +2: b 7 2 3 2 +3: b 7 2 6 3 +4: a NA NA 1 4 +5: a NA NA 3 5 +6: a NA NA 6 6 +7: c 8 4 1 7 +8: c 8 4 3 8 +9: c 8 4 6 9 +> DT[X, on="x", nomatch=NULL] # inner join + x y v i.v foo + +1: c 1 7 8 4 +2: c 3 8 8 4 +3: c 6 9 8 4 +4: b 1 1 7 2 +5: b 3 2 7 2 +6: b 6 3 7 2 +> DT[!X, on="x"] # not join + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> DT[X, on=c(y="v")] # join using column "y" of DT with column "v" of X + x y v i.x foo + +1: 8 NA c 4 +2: 7 NA b 2 +> DT[X, on="y==v"] # same as above (v1.9.8+) + x y v i.x foo + +1: 8 NA c 4 +2: 7 NA b 2 +> +> DT[X, on=.(y<=foo)] # NEW non-equi join (v1.9.8+) + x y v i.x i.v + +1: b 4 1 c 8 +2: b 4 2 c 8 +3: a 4 4 c 8 +4: a 4 5 c 8 +5: c 4 7 c 8 +6: c 4 8 c 8 +7: b 2 1 b 7 +8: a 2 4 b 7 +9: c 2 7 b 7 +> DT[X, on="y<=foo"] # same as above + x y v i.x i.v + +1: b 4 1 c 8 +2: b 4 2 c 8 +3: a 4 4 c 8 +4: a 4 5 c 8 +5: c 4 7 c 8 +6: c 4 8 c 8 +7: b 2 1 b 7 +8: a 2 4 b 7 +9: c 2 7 b 7 +> DT[X, on=c("y<=foo")] # same as above + x y v i.x i.v + +1: b 4 1 c 8 +2: b 4 2 c 8 +3: a 4 4 c 8 +4: a 4 5 c 8 +5: c 4 7 c 8 +6: c 4 8 c 8 +7: b 2 1 b 7 +8: a 2 4 b 7 +9: c 2 7 b 7 +> DT[X, on=.(y>=foo)] # NEW non-equi join (v1.9.8+) + x y v i.x i.v + +1: b 4 3 c 8 +2: a 4 6 c 8 +3: c 4 9 c 8 +4: b 2 2 b 7 +5: b 2 3 b 7 +6: a 2 5 b 7 +7: a 2 6 b 7 +8: c 2 8 b 7 +9: c 2 9 b 7 +> DT[X, on=.(x, y<=foo)] # NEW non-equi join (v1.9.8+) + x y v i.v + +1: c 4 7 8 +2: c 4 8 8 +3: b 2 1 7 +> DT[X, .(x,y,x.y,v), on=.(x, y>=foo)] # Select x's join columns as well + x y x.y v + +1: c 4 6 9 +2: b 2 3 2 +3: b 2 6 3 +> +> DT[X, on="x", mult="first"] # first row of each group + x y v i.v foo + +1: c 1 7 8 4 +2: b 1 1 7 2 +> DT[X, on="x", mult="last"] # last row of each group + x y v i.v foo + +1: c 6 9 8 4 +2: b 6 3 7 2 +> DT[X, sum(v), by=.EACHI, on="x"] # join and eval j for each row in i + x V1 + +1: c 24 +2: b 6 +> DT[X, sum(v)*foo, by=.EACHI, on="x"] # join inherited scope + x V1 + +1: c 96 +2: b 12 +> DT[X, sum(v)*i.v, by=.EACHI, on="x"] # 'i,v' refers to X's v column + x V1 + +1: c 192 +2: b 42 +> DT[X, on=.(x, v>=v), sum(y)*foo, by=.EACHI] # NEW non-equi join with by=.EACHI (v1.9.8+) + x v V1 + +1: c 8 36 +2: b 7 NA +> +> # setting keys +> kDT = copy(DT) # (deep) copy DT to kDT to work with it. +> setkey(kDT,x) # set a 1-column key. No quotes, for convenience. +> setkeyv(kDT,"x") # same (v in setkeyv stands for vector) +> v="x" +> setkeyv(kDT,v) # same +> haskey(kDT) # TRUE +[1] TRUE +> key(kDT) # "x" +[1] "x" +> +> # fast *keyed* subsets +> kDT["a"] # subset-as-join on *key* column 'x' +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> kDT["a", on="x"] # same, being explicit using 'on=' (preferred) +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> +> # all together +> kDT[!"a", sum(v), by=.EACHI] # get sum(v) for each i != "a" +Key: + x V1 + +1: b 6 +2: c 24 +> +> # multi-column key +> setkey(kDT,x,y) # 2-column key +> setkeyv(kDT,c("x","y")) # same +> +> # fast *keyed* subsets on multi-column key +> kDT["a"] # join to 1st column of key +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> kDT["a", on="x"] # on= is optional, but is preferred +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> kDT[.("a")] # same, .() is an alias for list() +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> kDT[list("a")] # same +Key: + x y v + +1: a 1 4 +2: a 3 5 +3: a 6 6 +> kDT[.("a", 3)] # join to 2 columns +Key: + x y v + +1: a 3 5 +> kDT[.("a", 3:6)] # join 4 rows (2 missing) + x y v + +1: a 3 5 +2: a 4 NA +3: a 5 NA +4: a 6 6 +> kDT[.("a", 3:6), nomatch=NULL] # remove missing +Key: + x y v + +1: a 3 5 +2: a 6 6 +> kDT[.("a", 3:6), roll=TRUE] # locf rolling join + x y v + +1: a 3 5 +2: a 4 5 +3: a 5 5 +4: a 6 6 +> kDT[.("a", 3:6), roll=Inf] # same as above + x y v + +1: a 3 5 +2: a 4 5 +3: a 5 5 +4: a 6 6 +> kDT[.("a", 3:6), roll=-Inf] # nocb rolling join + x y v + +1: a 3 5 +2: a 4 6 +3: a 5 6 +4: a 6 6 +> kDT[!.("a")] # not join +Key: + x y v + +1: b 1 1 +2: b 3 2 +3: b 6 3 +4: c 1 7 +5: c 3 8 +6: c 6 9 +> kDT[!"a"] # same +Key: + x y v + +1: b 1 1 +2: b 3 2 +3: b 6 3 +4: c 1 7 +5: c 3 8 +6: c 6 9 +> +> # more on special symbols, see also ?"special-symbols" +> DT[.N] # last row + x y v + +1: c 6 9 +> DT[, .N] # total number of rows in DT +[1] 9 +> DT[, .N, by=x] # number of rows in each group + x N + +1: b 3 +2: a 3 +3: c 3 +> DT[, .SD, .SDcols=x:y] # select columns 'x' through 'y' +Index: + x y + +1: b 1 +2: b 3 +3: b 6 +4: a 1 +5: a 3 +6: a 6 +7: c 1 +8: c 3 +9: c 6 +> DT[ , .SD, .SDcols = !x:y] # drop columns 'x' through 'y' + v + +1: 1 +2: 2 +3: 3 +4: 4 +5: 5 +6: 6 +7: 7 +8: 8 +9: 9 +> DT[ , .SD, .SDcols = patterns('^[xv]')] # select columns matching '^x' or '^v' +Index: + x v + +1: b 1 +2: b 2 +3: b 3 +4: a 4 +5: a 5 +6: a 6 +7: c 7 +8: c 8 +9: c 9 +> DT[, .SD[1]] # first row of all columns + x y v + +1: b 1 1 +> DT[, .SD[1], by=x] # first row of 'y' and 'v' for each group in 'x' + x y v + +1: b 1 1 +2: a 1 4 +3: c 1 7 +> DT[, c(.N, lapply(.SD, sum)), by=x] # get rows *and* sum columns 'v' and 'y' by group + x N y v + +1: b 3 10 6 +2: a 3 10 15 +3: c 3 10 24 +> DT[, .I[1], by=x] # row number in DT corresponding to each group + x V1 + +1: b 1 +2: a 4 +3: c 7 +> DT[, grp := .GRP, by=x] # add a group counter column +> DT[ , dput(.BY), by=.(x,y)] # .BY is a list of singletons for each group +list(x = "b", y = 1) +list(x = "b", y = 3) +list(x = "b", y = 6) +list(x = "a", y = 1) +list(x = "a", y = 3) +list(x = "a", y = 6) +list(x = "c", y = 1) +list(x = "c", y = 3) +list(x = "c", y = 6) + x y x y + +1: b 1 b 1 +2: b 3 b 3 +3: b 6 b 6 +4: a 1 a 1 +5: a 3 a 3 +6: a 6 a 6 +7: c 1 c 1 +8: c 3 c 3 +9: c 6 c 6 +> X[, DT[.BY, y, on="x"], by=x] # join within each group + x V1 + +1: c 1 +2: c 3 +3: c 6 +4: b 1 +5: b 3 +6: b 6 +> DT[, { ++ # write each group to a different file ++ fwrite(.SD, file.path(tempdir(), paste0('x=', .BY$x, '.csv'))) ++ }, by=x] +Empty data.table (0 rows and 1 cols): x +> dir(tempdir()) +[1] "x=a.csv" "x=b.csv" "x=c.csv" +> +> # add/update/delete by reference (see ?assign) +> print(DT[, z:=42L]) # add new column by reference +Index: + x y v grp z + +1: b 1 1 1 42 +2: b 3 2 1 42 +3: b 6 3 1 42 +4: a 1 4 2 42 +5: a 3 5 2 42 +6: a 6 6 2 42 +7: c 1 7 3 42 +8: c 3 8 3 42 +9: c 6 9 3 42 +> print(DT[, z:=NULL]) # remove column by reference +Index: + x y v grp + +1: b 1 1 1 +2: b 3 2 1 +3: b 6 3 1 +4: a 1 4 2 +5: a 3 5 2 +6: a 6 6 2 +7: c 1 7 3 +8: c 3 8 3 +9: c 6 9 3 +> print(DT["a", v:=42L, on="x"]) # subassign to existing v column by reference +Index: + x y v grp + +1: b 1 1 1 +2: b 3 2 1 +3: b 6 3 1 +4: a 1 42 2 +5: a 3 42 2 +6: a 6 42 2 +7: c 1 7 3 +8: c 3 8 3 +9: c 6 9 3 +> print(DT["b", v2:=84L, on="x"]) # subassign to new column by reference (NA padded) +Index: + x y v grp v2 + +1: b 1 1 1 84 +2: b 3 2 1 84 +3: b 6 3 1 84 +4: a 1 42 2 NA +5: a 3 42 2 NA +6: a 6 42 2 NA +7: c 1 7 3 NA +8: c 3 8 3 NA +9: c 6 9 3 NA +> +> DT[, m:=mean(v), by=x][] # add new column by reference by group +Index: + x y v grp v2 m + +1: b 1 1 1 84 2 +2: b 3 2 1 84 2 +3: b 6 3 1 84 2 +4: a 1 42 2 NA 42 +5: a 3 42 2 NA 42 +6: a 6 42 2 NA 42 +7: c 1 7 3 NA 8 +8: c 3 8 3 NA 8 +9: c 6 9 3 NA 8 +> # NB: postfix [] is shortcut to print() +> # advanced usage +> DT = data.table(x=rep(c("b","a","c"),each=3), v=c(1,1,1,2,2,1,1,2,2), y=c(1,3,6), a=1:9, b=9:1) +> +> DT[, sum(v), by=.(y%%2)] # expressions in by + y V1 + +1: 1 9 +2: 0 4 +> DT[, sum(v), by=.(bool = y%%2)] # same, using a named list to change by column name + bool V1 + +1: 1 9 +2: 0 4 +> DT[, .SD[2], by=x] # get 2nd row of each group + x v y a b + +1: b 1 3 2 8 +2: a 2 3 5 5 +3: c 2 3 8 2 +> DT[, tail(.SD,2), by=x] # last 2 rows of each group + x v y a b + +1: b 1 3 2 8 +2: b 1 6 3 7 +3: a 2 3 5 5 +4: a 1 6 6 4 +5: c 2 3 8 2 +6: c 2 6 9 1 +> DT[, lapply(.SD, sum), by=x] # sum of all (other) columns for each group + x v y a b + +1: b 3 10 6 24 +2: a 5 10 15 15 +3: c 5 10 24 6 +> DT[, .SD[which.min(v)], by=x] # nested query by group + x v y a b + +1: b 1 1 1 9 +2: a 1 6 6 4 +3: c 1 1 7 3 +> +> DT[, list(MySum=sum(v), ++ MyMin=min(v), ++ MyMax=max(v)), ++ by=.(x, y%%2)] # by 2 expressions + x y MySum MyMin MyMax + +1: b 1 2 1 1 +2: b 0 1 1 1 +3: a 1 4 2 2 +4: a 0 1 1 1 +5: c 1 3 1 2 +6: c 0 2 2 2 +> +> DT[, .(a = .(a), b = .(b)), by=x] # list columns + x a b + +1: b 1,2,3 9,8,7 +2: a 4,5,6 6,5,4 +3: c 7,8,9 3,2,1 +> DT[, .(seq = min(a):max(b)), by=x] # j is not limited to just aggregations + x seq + + 1: b 1 + 2: b 2 + 3: b 3 + 4: b 4 + 5: b 5 + 6: b 6 + 7: b 7 + 8: b 8 + 9: b 9 +10: a 4 +11: a 5 +12: a 6 +13: c 7 +14: c 6 +15: c 5 +16: c 4 +17: c 3 +> DT[, sum(v), by=x][V1<20] # compound query + x V1 + +1: b 3 +2: a 5 +3: c 5 +> DT[, sum(v), by=x][order(-V1)] # ordering results + x V1 + +1: a 5 +2: c 5 +3: b 3 +> DT[, c(.N, lapply(.SD,sum)), by=x] # get number of observations and sum per group + x N v y a b + +1: b 3 3 10 6 24 +2: a 3 5 10 15 15 +3: c 3 5 10 24 6 +> DT[, {tmp <- mean(y); ++ .(a = a-tmp, b = b-tmp) ++ }, by=x] # anonymous lambda in 'j', j accepts any valid + x a b + +1: b -2.3333333 5.6666667 +2: b -1.3333333 4.6666667 +3: b -0.3333333 3.6666667 +4: a 0.6666667 2.6666667 +5: a 1.6666667 1.6666667 +6: a 2.6666667 0.6666667 +7: c 3.6666667 -0.3333333 +8: c 4.6666667 -1.3333333 +9: c 5.6666667 -2.3333333 +> # expression. TO REMEMBER: every element of +> # the list becomes a column in result. +> pdf("new.pdf") +> DT[, plot(a,b), by=x] # can also plot in 'j' +Empty data.table (0 rows and 1 cols): x +> dev.off() +pdf + 2 +> ## Don't show: +> file.remove("new.pdf") +[1] TRUE +> ## End(Don't show) +> +> # using rleid, get max(y) and min of all cols in .SDcols for each consecutive run of 'v' +> DT[, c(.(y=max(y)), lapply(.SD, min)), by=rleid(v), .SDcols=v:b] + rleid y v y a b + +1: 1 6 1 1 1 7 +2: 2 3 2 1 4 5 +3: 3 6 1 1 6 3 +4: 4 6 2 3 8 1 +> +> # Support guide and links: +> # https://github.com/Rdatatable/data.table/wiki/Support +> +> ## Not run: +> ##D if (interactive()) { +> ##D vignette(package="data.table") # 9 vignettes +> ##D +> ##D test.data.table() # 6,000 tests +> ##D +> ##D # keep up to date with latest stable version on CRAN +> ##D update.packages() +> ##D +> ##D # get the latest devel version that has passed all tests +> ##D update_dev_pkg() +> ##D # read more at: +> ##D # https://github.com/Rdatatable/data.table/wiki/Installation +> ##D } +> ## End(Not run) +> +> +> cleanEx() +> nameEx("datatable-optimize") +> ### * datatable-optimize +> +> flush(stderr()); flush(stdout()) +> +> ### Name: datatable.optimize +> ### Title: Optimisations in data.table +> ### Aliases: datatable-optimize datatable.optimize data.table-optimize +> ### data.table.optimize gforce GForce autoindex autoindexing auto-index +> ### auto-indexing rounding +> ### Keywords: data +> +> ### ** Examples +> +> ## Not run: +> ##D old = options(datatable.optimize = Inf) +> ##D +> ##D # Generate a big data.table with a relatively many columns +> ##D set.seed(1L) +> ##D DT = lapply(1:20, function(x) sample(c(-100:100), 5e6L, TRUE)) +> ##D setDT(DT)[, id := sample(1e5, 5e6, TRUE)] +> ##D print(object.size(DT), units="Mb") # 400MB, not huge, but will do +> ##D +> ##D # 'order' optimisation +> ##D options(datatable.optimize = 1L) # optimisation 'on' +> ##D system.time(ans1 <- DT[order(id)]) +> ##D options(datatable.optimize = 0L) # optimisation 'off' +> ##D system.time(ans2 <- DT[order(id)]) +> ##D identical(ans1, ans2) +> ##D +> ##D # optimisation of 'lapply(.SD, fun)' +> ##D options(datatable.optimize = 1L) # optimisation 'on' +> ##D system.time(ans1 <- DT[, lapply(.SD, min), by=id]) +> ##D options(datatable.optimize = 0L) # optimisation 'off' +> ##D system.time(ans2 <- DT[, lapply(.SD, min), by=id]) +> ##D identical(ans1, ans2) +> ##D +> ##D # optimisation of 'mean' +> ##D options(datatable.optimize = 1L) # optimisation 'on' +> ##D system.time(ans1 <- DT[, lapply(.SD, mean), by=id]) +> ##D system.time(ans2 <- DT[, lapply(.SD, base::mean), by=id]) +> ##D identical(ans1, ans2) +> ##D +> ##D # optimisation of 'c(.N, lapply(.SD, ))' +> ##D options(datatable.optimize = 1L) # optimisation 'on' +> ##D system.time(ans1 <- DT[, c(.N, lapply(.SD, min)), by=id]) +> ##D options(datatable.optimize = 0L) # optimisation 'off' +> ##D system.time(ans2 <- DT[, c(N=.N, lapply(.SD, min)), by=id]) +> ##D identical(ans1, ans2) +> ##D +> ##D # GForce +> ##D options(datatable.optimize = 2L) # optimisation 'on' +> ##D system.time(ans1 <- DT[, lapply(.SD, median), by=id]) +> ##D system.time(ans2 <- DT[, lapply(.SD, function(x) as.numeric(stats::median(x))), by=id]) +> ##D identical(ans1, ans2) +> ##D +> ##D # optimized subsets +> ##D options(datatable.optimize = 2L) +> ##D system.time(ans1 <- DT[id == 100L]) # vector scan +> ##D system.time(ans2 <- DT[id == 100L]) # vector scan +> ##D system.time(DT[id %in% 100:500]) # vector scan +> ##D +> ##D options(datatable.optimize = 3L) +> ##D system.time(ans1 <- DT[id == 100L]) # index + binary search subset +> ##D system.time(ans2 <- DT[id == 100L]) # only binary search subset +> ##D system.time(DT[id %in% 100:500]) # only binary search subset again +> ##D +> ##D # sensitivity to collate order +> ##D old_lc_collate = Sys.getlocale("LC_COLLATE") +> ##D +> ##D if (old_lc_collate == "C") { +> ##D Sys.setlocale("LC_COLLATE", "") +> ##D } +> ##D DT = data.table( +> ##D grp = rep(1:2, each = 4L), +> ##D var = c("A", "a", "0", "1", "B", "b", "0", "1") +> ##D ) +> ##D options(datatable.optimize = Inf) +> ##D DT[, .(max(var), min(var)), by=grp] +> ##D # GForce is deactivated because of the ad-hoc column 'tolower(var)', +> ##D # through which the result for 'max(var)' may also change +> ##D DT[, .(max(var), min(tolower(var))), by=grp] +> ##D +> ##D Sys.setlocale("LC_COLLATE", old_lc_collate) +> ##D options(old) +> ## End(Not run) +> +> +> cleanEx() +> nameEx("dcast.data.table") +> ### * dcast.data.table +> +> flush(stderr()); flush(stdout()) +> +> ### Name: dcast.data.table +> ### Title: Fast dcast for data.table +> ### Aliases: dcast.data.table dcast +> ### Keywords: data +> +> ### ** Examples +> +> ChickWeight = as.data.table(ChickWeight) +> setnames(ChickWeight, tolower(names(ChickWeight))) +> DT <- melt(as.data.table(ChickWeight), id.vars=2:4) # calls melt.data.table +> +> # dcast is an S3 method in data.table from v1.9.6 +> dcast(DT, time ~ variable, fun.aggregate=mean) +Key: