You have numeric data stored like 75-80, GE75, LE25, LT50 etc. You want to replace with the midpoints (a common approach). This function does this parsing.
parse_censored_data_edfacts(vect, maxnum = 100, minnum = 0)
character vector to parse
maximum for purposes of GE and GT
minimum for purposes of LE and LT
In particular the censored data looks like this:
* numbers are like 75-80, with a dash in the middle meaning that it is somewhere in that range; or
* numbers are like GE75, meaning >=75
* numbers are like LE25, meaning <=25
* numbers are like LT50, meaning <50 (effectively the same as <=50 and treated as such here)
Given a character vector, this function returns a numeric vector that:
* returns the midpoint of things that look like 75-80 e.g.;
* returns (maxnum+75)/2 for GE75 e.g.;
* returns (minnum+25)/2 for LE25 e.g.
numeric vector of parsed data (with NA where the parse failed)
The name of the function will hopefully prevent conflicts with other packages but the method is probably more general than edfacts data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.