How To Install r-cran-ff on Kali Linux

In this tutorial we learn how to install r-cran-ff on Kali Linux. r-cran-ff is Memory-Efficient Fast-Access Storage of Large Data

Introduction

In this tutorial we learn how to install r-cran-ff on Kali Linux.

What is r-cran-ff

r-cran-ff is:

The ff package provides data structures that are stored on disk but behave (almost) as if they were in RAM by transparently mapping only a section (pagesize) in main memory - the effective virtual memory consumption per ff object. ff supports R’s standard atomic data types ‘double’, ’logical’, ‘raw’ and ‘integer’ and non-standard atomic types boolean (1 bit), quad (2 bit unsigned), nibble (4 bit unsigned), byte (1 byte signed with NAs), ubyte (1 byte unsigned), short (2 byte signed with NAs), ushort (2 byte unsigned), single (4 byte float with NAs). For example ‘quad’ allows efficient storage of genomic data as an ‘A’,‘T’,‘G’,‘C’ factor. The unsigned types support ‘circular’ arithmetic. There is also support for close-to-atomic types ‘factor’, ‘ordered’, ‘POSIXct’, ‘Date’ and custom close-to-atomic types.

ff not only has native C-support for vectors, matrices and arrays with flexible dimorder (major column-order, major row-order and generalizations for arrays). There is also a ffdf class not unlike data.frames and import/export filters for csv files. ff objects store raw data in binary flat files in native encoding, and complement this with metadata stored in R as physical and virtual attributes. ff objects have well-defined hybrid copying semantics, which gives rise to certain performance improvements through virtualization. ff objects can be stored and reopened across R sessions. ff files can be shared by multiple ff R objects (using different data en/de-coding schemes) in the same process or from multiple R processes to exploit parallelism. A wide choice of finalizer options allows one to work with ‘permanent’ files as well as creating/removing ’temporary’ ff files completely transparent to the user. On certain OS/Filesystem combinations, creating the ff files works without notable delay thanks to using sparse file allocation. Several access optimization techniques such as Hybrid Index Preprocessing and Virtualization are implemented to achieve good performance even with large datasets, for example virtual matrix transpose without touching a single byte on disk. Further, to reduce disk I/O, ’logicals’ and non-standard data types get stored native and compact on binary flat files i.e. logicals take up exactly 2 bits to represent TRUE, FALSE and NA.

Beyond basic access functions, the ff package also provides compatibility functions that facilitate writing code for ff and ram objects and support for batch processing on ff objects (e.g. as.ram, as.ff, ffapply). ff interfaces closely with functionality from package ‘bit’: chunked looping, fast bit operations and coercions between different objects that can store subscript information (‘bit’, ‘bitwhich’, ff ‘boolean’, ri range index, hi hybrid index). This allows to work interactively with selections of large datasets and quickly modify selection criteria.

There are three methods to install r-cran-ff on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install r-cran-ff Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install r-cran-ff using apt-get by running the following command:

sudo apt-get -y install r-cran-ff

Install r-cran-ff Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install r-cran-ff using apt by running the following command:

sudo apt -y install r-cran-ff

Install r-cran-ff Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install r-cran-ff using aptitude by running the following command:

sudo aptitude -y install r-cran-ff

How To Uninstall r-cran-ff on Kali Linux

To uninstall only the r-cran-ff package we can use the following command:

sudo apt-get remove r-cran-ff

Uninstall r-cran-ff And Its Dependencies

To uninstall r-cran-ff and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove r-cran-ff

Remove r-cran-ff Configurations and Data

To remove r-cran-ff configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge r-cran-ff

Remove r-cran-ff configuration, data, and all of its dependencies

We can use the following command to remove r-cran-ff configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge r-cran-ff

Dependencies

r-cran-ff have the following dependencies:

References

Summary

In this tutorial we learn how to install r-cran-ff package on Kali Linux using different package management tools: apt, apt-get and aptitude.