metrumresearchgroup / yspec

Data Specification for Pharmacometrics
https://metrumresearchgroup.github.io/yspec
5 stars 2 forks source link

Check for type in ys_add_factors #133

Open andersone1 opened 2 years ago

andersone1 commented 2 years ago

If type defined in spec does not match type of data, the factors do not always get created correctly

Potential fix:

if(.spec[[v]]$type != typeof(.data[[v]])){
  warning("Type defined in spec does not match type found in data for column ", v)
}

Below line 62 of col_factor.R