Learn R Programming

datadr (version 0.8.6.1)

removeData: Remove Key-Value Pairs from a Data Connection

Description

Remove key-value pairs from a data connection

Usage

removeData(conn, keys)

Arguments

conn

a kvConnection object

keys

a list of keys indicating which k/v pairs to remove

See Also

removeData, localDiskConn, hdfsConn

Examples

Run this code
# NOT RUN {
# connect to empty localDisk directory
conn <- localDiskConn(file.path(tempdir(), "irisSplit"), autoYes = TRUE)
# add some data
addData(conn, list(list("1", iris[1:10,])))
addData(conn, list(list("2", iris[11:90,])))
addData(conn, list(list("3", iris[91:110,])))
addData(conn, list(list("4", iris[111:150,])))
# represent it as a distributed data frame
irisDdf <- ddf(conn, update = TRUE)
irisDdf
# remove data for keys "1" and "2"
removeData(conn, list("1", "2"))
# look at result with updated attributes (reset = TRUE removes previous attrs)
irisDdf <- ddf(conn, reset = TRUE, update = TRUE)
irisDdf
# }

Run the code above in your browser using DataLab