I’m new to R. Please forgive me if this an easy one.
But I’m attempting to aggregate fields in a data table. However, I’m not get the correct result in the chart that is rendered.
At first glance, can anyone see a problem with my script?
# PLOT Bar Char
p <- plot_ly(
type = ‘bar’,
orientation = ‘v’,
x = dataset$xlabQ1,
transforms = list(
list(
type = ‘aggregate’,
groups = dataset$xlabQ1,
aggregations = list(
list(
target = ‘y’, func = ‘count’, enabled = T
)
)
)
)
)
p