Convert Data to Hyperframe

Converts data from any suitable format into a hyperframe.

manip, spatial
as.hyperframe(x, ...)
## S3 method for class 'default':
as.hyperframe(x, \dots)
## S3 method for class 'data.frame':
as.hyperframe(x, \dots, stringsAsFactors=FALSE)
## S3 method for class 'hyperframe':
as.hyperframe(x, \dots)
## S3 method for class 'listof':
as.hyperframe(x, \dots)
Data in some other format.
Optional arguments passed to hyperframe.
Logical. If TRUE, any column of the data frame x that contains character strings will be converted to a factor. If FALSE, no such conversion will occur.

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 and listof, and a default method, all of which convert data that is like a hyperframe into a hyperframe object. (The method for the class listof 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.


  • An object of class "hyperframe" created by hyperframe.

Conversion of Strings to Factors

Note that as.hyperframe.default will convert a character vector to a factor. It behaves like

However does not convert strings to factors; it respects the structure of the data frame x.

The behaviour can be changed using the argument stringsAsFactors.

See Also

hyperframe, as.hyperframe.ppx

  • as.hyperframe
  • as.hyperframe.default
  • as.hyperframe.hyperframe
  • as.hyperframe.listof
df <- data.frame(x=runif(4),y=letters[1:4])

   sims <- list()
   for(i in 1:3) sims[[i]] <- rpoispp(42)
Documentation reproduced from package spatstat, version 1.36-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.