Skip to contents

Write an AmigaBasicShape() class object to a file in its binary format.

Usage

write.AmigaBasicShape(x, file, disk = NULL)

Arguments

x

The AmigaBasicShape() class object that needs to be stored.

file

A character string specifying the file location to which x (an AmigaBasicShape() object) needs to be written.

disk

A virtual Commodore Amiga disk to which the file should be written. This should be an amigaDisk() object. Using this argument requires the adfExplorer package. When set to NULL, this argument is ignored.

Value

Invisibly returns the result of the call of close to the file connection. Or, when disk is specified, a copy of disk is returned to which the file(s) is/are written.

Details

This function coerces the Amiga Basic Shape into its binary format (using as.raw()) and writes it to a file. The file can also be stored onto a virtual Amiga disk (amigaDisk()).

Author

Pepijn de Vries

Examples

if (FALSE) {
filename <- system.file("ball.shp", package = "AmigaFFH")
ball     <- read.AmigaBasicShape(filename)
write.AmigaBasicShape(ball, file.path(tempdir(), "ball.shp"))
}