Learn R Programming

datadr (version 0.8.6.1)

addData: Add Key-Value Pairs to a Data Connection

Description

Add key-value pairs to a data connection

Usage

addData(conn, data, overwrite = FALSE)

Arguments

conn

a kvConnection object

data

a list of key-value pairs (list of lists where each sub-list has two elements, the key and the value)

overwrite

if data with the same key is already present in the data, should it be overwritten? (does not work for HDFS connections)

See Also

removeData, localDiskConn, hdfsConn

Examples

Run this code
# NOT RUN {
  # connect to empty HDFS directory
  conn <- hdfsConn("/test/irisSplit")
  # add some data
  addData(conn, list(list("1", iris[1:10,])))
  addData(conn, list(list("2", iris[11:110,])))
  addData(conn, list(list("3", iris[111:150,])))
  # represent it as a distributed data frame
  hdd <- ddf(conn)
# }

Run the code above in your browser using DataLab