I am once again asking for you support!
I have the data frame, where different indecies on nation are presented, you can see them in the picture .
I want to compute all these indecies into one new variable but I do not know how to do it. I tried rowMeans()
function but I might be a very stupid person, so I have not succeded in computing.
mean()
did not worked - it appeared that "the argument is not numeric or logic: NAs to return". I have also concerns that mean()
computes the means in the whole column as a vector, not by the rows, as I need. Once again - I need to recieve means from nation# variables for each observation in the data frame.
Could anyone, please, help me with this pretty simple task?