Automatically write an object to a file based on extension

autowrite(x, file, ...)

Arguments

x

Object to be saved

file

Full path to save the object to

...

Other arguments to be passed to the particular saving function

Value

Invisibly passes TRUE if the file saves successfully