rfml (version 0.1.0)

as.ml.data.frame: Upload data in a data.frame object or create data based on a ml.data.frame object

Description

The function will upload the data within a data.frame object or create data in MarkLogic Server based on a ml.data.frame object. Data created based on ml.data.frame will be flat and fields will have the same names as in the .col.name slot. See details for more information about how data is created.

Usage

as.ml.data.frame(conn, x, name, format = "json", directory = "")

Arguments

conn
A ml.conn object that has a valid connection to a MarkLogic Server
x
a Data Frame or ml.data.frame object.
name
The name of the object.
format
The format od the documents that is created, json or XML. Default is json
directory
The directory to save the documents, needs to start and end with a /. Default saved to /rfml/[username]/[name]/

Value

A ml.data.frame object.

Details

When data is uploaded or created it will be stored as json documents default, the format parameter controls, and Document URIs, the identifier of a document, is generated based on the string "rfml", the rowname if a data.frame or a counter if it is a ml.data.frame, the loged in username and the name parameter, for example /rfml/admin/iris/. The documents will also belong to a collection named after tne name parameter.

See Also

ml.data.frame, as.data.frame for pulling data, rm.ml.data.frame for delete uploaded data

Examples

Run this code
## Not run: 
#  library(rfml)
#  ml.connect()
#  # create a ml.data.frame based on the iris data set
#  mlIris <- as.ml.data.frame(iris, "iris")
# ## End(Not run)

Run the code above in your browser using DataLab