ena.plot.group: Plot of ENA set groups

View source: R/ena.plot.group.R

ena.plot.groupR Documentation

Plot of ENA set groups

Description

Plot a point based on a summary statistic computed from a given method (typically, mean) for a set of points in a projected ENA space

Usage

ena.plot.group(
  enaplot,
  points = NULL,
  method = "mean",
  labels = NULL,
  colors = default.colors[1],
  shape = c("square", "triangle-up", "diamond", "circle"),
  confidence.interval = c("none", "crosshairs", "box"),
  outlier.interval = c("none", "crosshairs", "box"),
  label.offset = "bottom right",
  label.font.size = NULL,
  label.font.color = NULL,
  label.font.family = NULL,
  show.legend = T,
  legend.name = NULL,
  ...
)

Arguments

enaplot

ENAplot object to use for plotting

points

A matrix or data.frame where columns contain coordinates of points in a projected ENA space

method

A function for computing a summary statistic for each column of points

labels

A character which will be the label for the group's point

colors

A character, determines color of the group's point, default: enaplot$color

shape

A character, determines shape of the group's point, choices: square, triangle, diamond, circle, default: square

confidence.interval

A character that determines how the confidence interval is displayed, choices: none, box, crosshair, default: none

outlier.interval

A character that determines how outlier interval is displayed, choices: none, box, crosshair, default: none

label.offset

character: top left (default), top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right

label.font.size

An integer which determines the font size for label, default: enaplot$font.size

label.font.color

A character which determines the color of label, default: enaplot$font.color

label.font.family

A character which determines font type, choices: Arial, Courier New, Times New Roman, default: enaplot$font.family

show.legend

Logical indicating whether to show the point labels in the in legend

legend.name

Character indicating the name to show above the plot legend

...

Additional parameters

Details

Plots a point based on a summary statistic for a group (typically, mean)

Value

The ENAplot provided to the function, with its plot updated to include the new group point.

See Also

ena.plot, ena.plot.points

Examples


data(RS.data)

codeNames = c('Data','Technical.Constraints','Performance.Parameters',
  'Client.and.Consultant.Requests','Design.Reasoning','Collaboration');

accum = ena.accumulate.data(
  units = RS.data[,c("UserName","Condition")],
  conversation = RS.data[,c("Condition","GroupName")],
  metadata = RS.data[,c("CONFIDENCE.Change","CONFIDENCE.Pre","CONFIDENCE.Post")],
  codes = RS.data[,codeNames],
  window.size.back = 4
)

set = ena.make.set(
  enadata = accum,
  rotation.by = ena.rotate.by.mean,
  rotation.params = list(
      accum$meta.data$Condition=="FirstGame",
      accum$meta.data$Condition=="SecondGame"
  )
)

plot = ena.plot(set)

unitNames = set$enadata$units

### Plot Condition 1 Group Mean
plot = ena.plot.group(plot, as.matrix(set$points$Condition$FirstGame), labels = "FirstGame",
    colors = "red", confidence.interval = "box")

### plot Condition 2 Group Mean
plot = ena.plot.group(plot, as.matrix(set$points$Condition$SecondGame), labels = "SecondGame",
    colors  = "blue", confidence.interval = "box")

## Not run: print(plot)


rENA documentation built on May 29, 2024, 2:37 a.m.