I would like to convert an array of strings of "Yes"/"No" to boolean type.
At first, I checked if there were NAs present:
convert(Array, datsub[:s734y])
which didn't work, so there were NAs
So I converted the NAs to "No"
datsub[isna(datsub[:s734y]),:s734y] = "No"
and then this worked:
map(s->s==""||s=="NA" ? "No" : s, datsub[:s734y])
so I am somewhat sure (also from viewing the dataset) that I only have "yes"/"no" values
My code to convert it to Boolean is:
convert(Vector{Bool}, map(q-> tryparse(Bool, q), datsub[:s734y]))
Which returns Inexact Error
Any idea why my code is wrong?
Addendum: type conversion is a general frustration for me at this point.