Learn R Programming

spatstat.geom (version 3.6-1)

as.hyperframe: Convert Data to Hyperframe

Description

Converts data from any suitable format into a hyperframe.

Usage

as.hyperframe(x, ...)

# S3 method for default as.hyperframe(x, ...)

# S3 method for data.frame as.hyperframe(x, ..., stringsAsFactors=FALSE)

# S3 method for hyperframe as.hyperframe(x, ...)

# S3 method for listof as.hyperframe(x, ...)

# S3 method for anylist as.hyperframe(x, ...)

Arguments

Value

An object of class "hyperframe" created by

hyperframe.

Details

A hyperframe is like a data frame, except that its entries can be objects of any kind.

The generic function as.hyperframe converts any suitable kind of data into a hyperframe.

There are methods for the classes data.frame, listof, anylist and a default method, all of which convert data that is like a hyperframe into a hyperframe object. (The method for the class listof and anylist converts a list of objects, of arbitrary type, into a hyperframe with one column.) These methods do not discard any information.

There are also methods for other classes (see as.hyperframe.ppx) which extract the coordinates from a spatial dataset. These methods do discard some information.

See Also

hyperframe, as.hyperframe.ppx

Examples

Run this code
   df <- data.frame(x=runif(4),y=letters[1:4])
   as.hyperframe(df)

   sims <- replicate(3, runifrect(10), simplify=FALSE)
   as.hyperframe(as.listof(sims))
   as.hyperframe(as.solist(sims))

Run the code above in your browser using DataLab