Skip to contents

This function exports a GWAS Catalog object to Microsoft Excel xlsx file. Each table (slot) is saved in its own sheet.

Usage

write_xlsx(x, file = stop("`file` must be specified"))

Arguments

x

A studies, associations, variants or traits object.

file

A file name to write to.

Value

Although this function is run for its side effect of writing an xlsx file, the path to the exported file is returned.

Examples

# Initial setup
.old_wd <- setwd(tempdir())

# Save an `associations` object, e.g. `associations_ex01`, to xlsx.
write_xlsx(associations_ex01, "associations.xlsx")

# Cleanup
unlink("associations.xlsx")
setwd(.old_wd)