Closed wwieder closed 6 years ago
not surprising, but same issue for 15n
HELPER FUNCTION ggname: to surround dependent variable passed to plotting function in backticks. This problem arose when attempting to plot data sets that had column nanes starting with a number (e.g., 13c) because we need to call aes_string (as opposed to aes); ggname applied to depVar in the qcPlotsInner function.
ggname <- function(x) {
if (class(x) != "character") {
return(x)
}
y <- sapply(x, function(s) {
if (!grepl("^`", s)) {
s <- paste("`", s, sep="", collapse="")
}
if (!grepl("`$", s)) {
s <- paste(s, "`", sep="", collapse="")
}
}
)
y
}
There seems to be an issue with the QC script recognizing the variable '13c' (presumably because it starts with a numeric).
see BNZ2, which produces this error: Error in parse(text = x) ::1:3: unexpected symbol
1: 13c