Description Usage Arguments Value Examples
This function maps CPC to FCL codes using the table defined within the SWS.
1 |
cpcCodes |
A character vector containing the CPC codes. |
returnFirst |
Logical. If one CPC code maps to multiple FCL codes, we have no way of correctly mapping a single code without more information. The code is designed to throw an error at this point, but if you want to force a result (and return the lowest numerical code of all the matches) then set this to TRUE. In that case, only a warning will be issued if this type of mapping occurs. In general, setting this to TRUE is bad practice. However, the mapping at the time of this writing is entirely one-to-one except for maize, which is mapped to maize, white maize, and popcorn. It's probably not very bad to ignore this issue. |
version |
character. This specifies the version of the conversion tables between fcl and cpc. To use the latest version, you can use 'latest'. The other tables available are '2.1preliminary', the default one and '2.1' which is the update and official one. |
A character vector whose ith element is the FCL code corresponding to the passed CPC code in position i. If no valid mapping is found, an NA is returned in this place.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.