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

Description Usage Arguments Details Value See Also Examples

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

1
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]/

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.

Value

A ml.data.frame object.

See Also

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

Examples

1
2
3
4
5
6
7
## 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)

rfml documentation built on May 2, 2019, 3:01 a.m.