Learn R Programming

repijson (version 0.1.0)

define_ejEvent: Creates a event definition

Description

Simplifies the definition of events from columns within a dataframe

Usage

define_ejEvent(id = NA, name = NULL, date = NULL, location = NULL, attributes = NULL)

Arguments

id
A character string naming the column that defines the id for a event. May be NA, and if so will be automatically generated.
name
Either a character string with the event name. Or the name of the column that contains names for events as a character string. If the column name is found in the input data.frame to as.ejObject.data.frame then the data in the column is used otherwise the string itself is used. Event names might be things such as infection, swab, hospital admission,etc.
date
A character string naming the column that defines the date an event occured. This should be in POSIXct format. May be NA.
location
A list with entities x, y and proj4string. x and y should be character strings naming the columns where the x and y of the location are defined. crs may be "" or a proj4string.
attributes
A character vector naming the columns for attributes of the event. The attributes will be named after the columns, with type taken from column type.