Converting array into raster brick

Clash Royale CLAN TAG#URR8PPPConverting array into raster brick
I have three models composed by 19 .tif files each one
If I were to convert the models into a raster object, I'd do:
require(raster)
require(rgdal)
model_1 <- rasterFromXYZ(model_1)
model_2 <- rasterFromXYZ(model_2)
model_3 <- rasterFromXYZ(model_3)
Since I have to do some processing in the models, I stack them into a Large array.
stack
models_raw <- stack(list.files(directories[i],pattern = ".tif$", full.names = TRUE))
After my processing my output object is a Large array type of object. Which I need to use for some more work, but as a raster object.
My failed attempts were.
models_raster <- rasterFromXYZ(models_raw)
models_raster <- setValues(model_raw)
models_raster <- stack(models_raw)
How do I convert a three dimension Large Array type of object into a RasterBrick?
Regards.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.