Now that we are done resizing, we will start merging the arrays:
- After our images are resized, there is just one last step to get the data in the proper format. The data is currently stored in a list of arrays; however, we need the data to all be in one four-dimensional array. The following code takes all our three-dimensional arrays and combines them along a new fourth dimension. We can combine all of our three-dimensional arrays into one four-dimensional array and then view the dimensions using the following code:
image_array <- abind::abind( image_list, along = 0)dim(image_array)
- This code will print details about our image dimensions to the console, so we can now see the new shape of our four-dimensional array and how ...