Description Usage Arguments Value Examples
Expands a data frame by merging with a MxN permutation data.frame filled with 0 or other
1 | expandDataFrame(df, namex, x, namey, y, namez, z.val = 0)
|
df |
input data frame |
namex |
variable name for rows |
x |
vector of values of rows |
namey |
variable name for columns |
y |
vector of values of columns |
namez |
name of the merged field, usually a count |
z.val |
value to fill the merged column with |
a filled data frame
1 2 3 | heatmap_pivot <- expandDataFrame(visit_pivot, 'hour', c(0:23), 'wday', c(1:7), 'count')
heatmap_visits <- reshape(heatmap_pivot, idvar="hour",timevar="wday",direction="wide")
heatmap_visits$hour <- NULL
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.