new_hstore: Create a empty hstore

Description Usage Arguments Value See Also Examples

View source: R/hstore.R

Description

This function creates an empty list of lists, which can be appended to a data frame as a hstore column.

Usage

1

Arguments

nr

Number of records.

Value

A empty hstore (list of lists) of length nr.

See Also

%->% to read or edit the resulting data structure.

Examples

1
2
3
4
5
contacts <- data.frame(name = c("Anne", "Bert", "Chris"))
contacts$phone <- new_hstore(3)
contacts$phone %->% "home" <- c("555-123-4567", "555-923-9134", "555-276-1123")
contacts$phone[2] %->% "cell" <- "555-889-9134"
str(contacts)

postGIStools documentation built on Sept. 20, 2019, 5:04 p.m.