Use case: You want to combine multidimensional arrays into a single array.
The ‘abind’ library is a generalization of the ‘cbind’ and ‘rbind’ libraries. It works with vectors, matrixes, and higher-dimensional arrays. It also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays.
For this task, assume:
- The abind R script "abind.R" is stored on a client’s machine.
- The requirement file "reqs_abind_R.txt" is stored on client’s machine.
Prerequisite steps:
- Connect from a client to a target VantageCloud Lake system where the task will be performed.
- Import necessary modules on the client for the current use case.
from teradatasqlalchemy.types import VARCHAR
- Specify as a variable the path where the script and model files are kept on the client.
path_to_files = '/Users/JaneDoe/OpeanAFexamples/scripts/'
- Specify as a variable the path where the requirement file is stored on the client.
path_to_reqsfiles = '/Users/JaneDoe/OpeanAFexamples/reqsfiles/'