researchdatapod.com
How to Solve R Error in colSums – ‘x’ must be an array of at least two dimensions
This error occurs when you try to pass a 1-dimensional vector to the colSums function, which expects a 2-dimensional input. If we want to subset a data frame column, we can use the drop argument to…