Reads electrode positions from a CSV file with x, y, z coordinates.
Usage
readElectrodePositionsCSV(
path,
name_col = "name",
x_col = "x",
y_col = "y",
z_col = "z",
sep = ",",
...
)References
Wickham H (2014). "Tidy Data." Journal of Statistical Software, 59(10), 1-23. doi:10.18637/jss.v059.i10
Examples
# Write electrode positions to a temporary CSV, then read them back
pe <- PhysioExperiment(
assays = list(raw = matrix(rnorm(400), nrow = 100, ncol = 4)),
colData = S4Vectors::DataFrame(label = c("Fz", "Cz", "Pz", "Oz")),
samplingRate = 100
)
pe <- applyMontage(pe, "10-20")
tmp <- tempfile(fileext = ".csv")
writeElectrodePositionsCSV(pe, tmp)
positions <- readElectrodePositionsCSV(tmp)
unlink(tmp)