Variance or other calculation across columns in R

Here is how to calculate variance across columns in the R data frame. The same technique can be useful in other situations. Like in this other example. Get a count of NA values for each of the columns in the R data frame.

Exit mobile version