Description Usage Arguments Value See Also Examples
Return a string representing the ‘bagEarth’ expression.
1 2 |
x |
An |
file |
A connection, or a character string naming the file to print to. If "" (the default), the output prints to the standard output connection. See |
cat |
a logical; should the equation be printed? |
... |
Arguments to |
A character representation of the bagged earth object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | a <- bagEarth(Volume ~ ., data = trees, B= 3)
cat(format(a))
# yields:
# (
# 31.61075
# + 6.587273 * pmax(0, Girth - 14.2)
# - 3.229363 * pmax(0, 14.2 - Girth)
# - 0.3167140 * pmax(0, 79 - Height)
# +
# 22.80225
# + 5.309866 * pmax(0, Girth - 12)
# - 2.378658 * pmax(0, 12 - Girth)
# + 0.793045 * pmax(0, Height - 80)
# - 0.3411915 * pmax(0, 80 - Height)
# +
# 31.39772
# + 6.18193 * pmax(0, Girth - 14.2)
# - 3.660456 * pmax(0, 14.2 - Girth)
# + 0.6489774 * pmax(0, Height - 80)
# )/3
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.