Doing a statistical project, first time R user.
One column details whether or not a town is a residential or working town. The other column being analysed details the proportion of people from said town who are currently employed.
I’ve created a subset for the residential towns (residential_towns <- subset(english_education, job_density_flag == ‘Residential’), and did so similarly for working towns.
Now, when I try to calculate the mean of individuals from all working towns who are employed (employment_working <- mean(working_towns$activity_at_age_19_employment_with_earnings_above_0), I get the ‘NA_real_error’.
However, when I run the code using residential towns, (employment_residential <- mean(residential_towns$activity_at_age_19_employment_with_earnings_above_0), it works perfectly fine.
Does anyone know why? I’d be happy to provide more details 😉
I tried to calculate the mean of individuals who are currently employed from all working towns, however I was met with the NA_real_error
user24655742 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.