Description Usage Arguments Details Value Author(s) Examples
Generate appends columns to each row of the data by evaluating the given expression
1 |
x |
an object of class |
... |
a list of |
It is important to note that generation adds overhead to the
evaluation process. Creating an additional attribute solely for use in
a single GLA or filtering is discouraged because of
this. Generate
is more appropiately used in conjunction with
either joining, writing to the disc, or several actions using the same
new attribute. See ‘examples’ below for more information.
An object of class "data"
with the additonal columns.
Jon Claus at Tera Insights LLC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## inefficient usage
data <- Read(lineitem100g)
data <- Generate(data, cost = l_extended_price * (1 + l_tax) * (1 -
l_discount))
data <- data[cost < 100]
## this is also inefficient
data <- Read(lineitem100g)
data <- Generate(data, cost = l_extended_price * (1 + l_tax) * (1 -
l_discount), stock = l_quantity * l_extended_price)
data <- data[cost < 100]
data <- data[stock > 10]
## advised usage
supplier <- Read(supplier100g)
lineitem <- Read(lineitem100g)
lineitem <- Generate(lineitem, stock = l_quantity * l_extended_price)
data <- Join(supplier, s_acctbal, lineitem, stock)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.