The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
library(musclesyneRgies)
To better control what is going on with the computation functions, plots are tremendously helpful. The first important plot is that of raw EMG.
# Load the built-in example data set
data("RAW_DATA")
# Raw EMG can be plotted with the following (the first three seconds are plot by default)
<- plot_rawEMG(
pp 1]],
RAW_DATA[[trial = names(RAW_DATA)[1],
row_number = 4,
col_number = 4,
line_col = "tomato3"
)
The second important plot, is that of filtered and normalised EMG. The figure can be used to check the average activations across all available cycles and search for potential inconsistencies in the acquisition.
# Filter...
<- lapply(RAW_DATA, function(x) filtEMG(x))
filtered_EMG # ...and normalise raw EMG
<- lapply(
norm_EMG
filtered_EMG,function(x) {
normEMG(x,
trim = TRUE,
cy_max = 3,
cycle_div = c(100, 100)
)
}
)
# The filtered and time-normalised EMG can be plotted with the following
<- plot_meanEMG(
pp 1]],
norm_EMG[[trial = names(norm_EMG)[1],
row_number = 4,
col_number = 4,
line_size = 0.8,
line_col = "tomato3"
)
Third, muscle synergies extracted from each trial can be plotted to eyeball the first (unclassified) results.
# Extract synergies via NMF
<- lapply(norm_EMG, synsNMF)
SYNS
# The extracted synergies can be plotted with the following
<- plot_syn_trials(SYNS[[1]],
pp max_syns = max(unlist(lapply(SYNS, function(x) x$syns))),
trial = names(SYNS)[1],
line_size = 0.8,
line_col = "tomato1",
sd_col = "tomato4"
)
Last but not least, classified synergies from all trials can be put into a single, final plot which resembles what we can usually find in motor control scientific publications.
# Load synergies
data("SYNS")
# Classify with k-means
# A plot of FWHM vs. CoA of the classified synergies appears by default
# This should help the user to identify potential malfunctions in the clustering
<- classify_kmeans(SYNS) SYNS_classified
# Classified synergies can be finally plotted with
<- plot_classified_syns(SYNS_classified,
pp line_col = "tomato1",
sd_col = "tomato4",
condition = "TW"
# "TW" = Treadmill Walking, change with your own )
An additional, almost purely cosmetic, tool is the 2D UMAP of the classified synergies. This can be of some help in visually identifying the classified clusters of similar synergies, but it should be used only for data inspection purposes and not to drive the whole analysis.
<- plot_classified_syns_UMAP(
pp
SYNS_classified,condition = "TW"
)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.