Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stream_generate_test

Generate Test Stream


Description

Generates a local test stream, useful when testing streams locally.

Usage

stream_generate_test(
  df = rep(1:1000),
  path = "source",
  distribution = floor(10 + 1e+05 * stats::dbinom(1:20, 20, 0.5)),
  iterations = 50,
  interval = 1
)

Arguments

df

The data frame used as a source of rows to the stream, will be cast to data frame if needed. Defaults to a sequence of one thousand entries.

path

Path to save stream of files to, defaults to "source".

distribution

The distribution of rows to use over each iteration, defaults to a binomial distribution. The stream will cycle through the distribution if needed.

iterations

Number of iterations to execute before stopping, defaults to fifty.

interval

The inverval in seconds use to write the stream, defaults to one second.

Details

This function requires the callr package to be installed.


sparklyr

R Interface to Apache Spark

v1.6.2
Apache License 2.0 | file LICENSE
Authors
Javier Luraschi [aut], Kevin Kuo [aut] (<https://orcid.org/0000-0001-7803-7901>), Kevin Ushey [aut], JJ Allaire [aut], Samuel Macedo [ctb], Hossein Falaki [aut], Lu Wang [aut], Andy Zhang [aut], Yitao Li [aut, cre] (<https://orcid.org/0000-0002-1261-905X>), Jozef Hajnala [ctb], Maciej Szymkiewicz [ctb] (<https://orcid.org/0000-0003-1469-9396>), Wil Davis [ctb], RStudio [cph], The Apache Software Foundation [aut, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.