Travis-CI Build Status AppVeyor Build Status Coverage Status CRAN_Status_Badge


Memory-map text files of characters.


# For the CRAN version

# For the current development version

Input format

As inputs, package mmapcharr uses text files of characters separated by another character. Lines should be the same so that the file can be viewed as a matrix. Files should end up with an empty line.

You can play with the code parameter to access whatever you want instead of characters (see the example code below).

An example of supported file

You can access files in such shape the same way as for R(cpp) matrices.

Example code


test_file <- system.file("testdata/test-windows.txt", package = "mmapcharr")

# Create the memory-mapping object based on the text file
test <- mmapchar(test_file, code = mmapcharr:::CODE_012)
test[, 1:10]

# Underlying characters
(CHAR256 <- rawToChar(as.raw(0:255), multiple = TRUE))

# Change the code to access true characters
test2 <- test$copy(code = CHAR256)
test2[, 1:10]

# Change the code to access logicals (why not?)
test3 <- test$copy(code = rep(c(TRUE, FALSE), 256 / 2))
test3[, 1:10]

Bug report / Help

Please open an issue if you find a bug.

privefl/mmapcharr documentation built on Feb. 19, 2018, 4:06 a.m.