https://researchdatapod.com/how-to-solve-r-error-in-xji-invalid-subscript-type-list/
How to solve R Error in xj[i] : invalid subscript type 'list'