Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Getting mean of a numeric variable according to the categorical variable in R

$
0
0

@sanchi_singh1 wrote:

I was trying to calculate the mean of Variable Age for all the females in my dataset but I am getting error NaN. Kindly help me out with this
mean(Age[Gender == "Female"])
[1] NaN

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles