Fix exporting of categorical values in Fieldlog and R

Reviewer: Daniel Villafuerte

Issue: GCP-9466, GCP-9467