I have a list of axis labels for various water properties. Some have chemical formulae that need subscript. However, I keep getting an error of: non-numeric argument to binary operator.
This is the code for the subscript.
axisLabels <- list('DA' = c('Dissolved Ammonium (NH'[4]*') \n(mg/l)', 'Sampling Site'),
'DNI' = c('Dissolved Nitrite \n(mg NO'[2]*'/L)', 'Sampling Site'),
'DNA' = c('Dissolved Nitrate \n(NO'[3]*')', 'Sampling Site'),
'DS' = c('Dissolved Sulphate \n(mg SO'[4]*'/L)', 'Sampling Site'))
This is the Error:
Error in "Dissolved Ammonium (NH"[4] * ") \n(mg/l)" :
non-numeric argument to binary operator

