is there a mean.n function (just as in SPSS) in mosaic in R?
I have 3 columns of data (including "NA") and I want a new column to have the means of the 3 data points for each row. How do I do that?
is there a mean.n function (just as in SPSS) in mosaic in R?
I have 3 columns of data (including "NA") and I want a new column to have the means of the 3 data points for each row. How do I do that?
Copyright © 2021 Jogjafile Inc.
rowMeansmight be just what you are looking for. It will return the row-wise mean, make sure to select/subset the right columns.Here is an example
You mentioned that you have
NAs in your data, make sure to includena.rm = TRUEif appropriate.Created on 2021-04-02 by the reprex package (v0.3.0)