origin.RdUse this function to extract the information on how the HDD data set was created.
origin(x)A character vector, if the HDD data set has been created with several instances of write_hdd its length will be greater than 1.
Each HDD lives on disk and a “_hdd.txt” is always present in the folder containing summary information. The function origin extracts the log from this information file.
See hdd, sub-.hdd and cash-.hdd
for the extraction and manipulation of out of memory data. For importation of
HDD data sets from text files: see txt2hdd.
See hdd_slice to apply functions to chunks of data (and create
HDD objects) and hdd_merge to merge large files.
To create/reshape HDD objects from memory or from other HDD objects, see
write_hdd.
To display general information from HDD objects: origin,
summary.hdd, print.hdd,
dim.hdd and names.hdd.
# Toy example with iris data
hdd_path = tempfile()
write_hdd(iris, hdd_path, rowsPerChunk = 20)
base_hdd = hdd(hdd_path)
origin(base_hdd)
#> [1] "# 1-8 ; 150 rows ; write_hdd(x = iris, dir = hdd_path, rowsPerChunk = 20)"
# Let's add something
write_hdd(head(iris), hdd_path, add = TRUE)
write_hdd(iris, hdd_path, add = TRUE, rowsPerChunk = 50)
base_hdd = hdd(hdd_path)
origin(base_hdd)
#> [1] "# 1-8 ; 150 rows ; write_hdd(x = iris, dir = hdd_path, rowsPerChunk = 20)"
#> [2] "# 9 ; 6 rows ; write_hdd(x = head(iris), dir = hdd_path, add = TRUE)"
#> [3] "# 10-12 ; 150 rows ; write_hdd(x = iris, dir = hdd_path, rowsPerChunk = 50, add = TRUE)"