Write the output of the VariantAnnotation package to file
Is there any way to force R to give me the same representation as head?


head just cuts off everything after the first six entries. The magic, as it were, happens in the default print method for the specific type. But the representation generated by it is only useful for ad-hoc display, not for storage in a structured data file.

The best solution is therefore to manually convert the column types. Since it’s only one column:

coding$ALT = sapply(coding$ALT, as.character)


I’m a bit puzzled that the REF and ALT column have different types, anyway: that’s probably a bug in the {VariantAnnotation} package that should be reported.

Furthermore, you probably want to use quote = FALSE for the write.table. In general, write.table has terrible defaults. readr::write_tsv is almost always a better choice.