I’m trying to normalize data from a CSV file, I’m separating out the columns then attempting to normalize per column but the console is throwing me an error I don’t understand – “String:multiChannelPerform. Cannot expand strings.” could anyone explain what’s going wrong? thanks!
~csvfile_0=Array.fill(~csvfile.size,{arg i;~csvfile.at(i).asArray.at(0)});
~csvfile_0.normalize(100,1000);
-> [ 0.000850007, 0.002550022, 0.004250037, 0.005950051, 0.007650065, 0.00935008, 0.011050095, 0.012750109, 0.014450124, 0.016150137, 0.017850153, 0.019550167, 0.02125018, 0.022950197, 0.02465021, 0.026350226, 0.02805024, 0.029750254, 0.031450268, 0.033150285, 0.0348503, 0.036550313, 0.038250327, 0.03995034, 0.041650355, 0.043350372, 0.045050386, 0.0467504, 0.048450414, 0.050150428, 0.05185044, 0.05355046, 0.055250473, 0.056950487, 0.0586505, 0.060350515, 0.062050533, 0.06375054, 0.06545056, 0.06715058, 0.0688…etc…
ERROR: String:multiChannelPerform. Cannot expand strings.
CALL STACK:
Exception:reportError
arg this =
Nil:handleError
arg this = nil
arg error =
Thread:handleError
arg this =
arg error =
Object:throw
arg this =
String:multiChannelPerform
arg this = “0.000850007”
arg selector = ‘linlin’
arg args = [*4]
< FunctionDef in Method Collection:collectAs >
arg elem = “0.000850007”
arg i = 0
ArrayedCollection:do
arg this = [*1000]
arg function =
var i = 0
Collection:collectAs
arg this = [*1000]
arg function =
arg class =
var res = [*0]
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine
arg this =
var res = nil
var func =
var code = “~csvfile_0.normalize(100,1000);”
var doc = nil
var ideClass =
Process:interpretPrintCmdLine
arg this =
^^ The preceding error dump is for ERROR: String:multiChannelPerform. Cannot expand strings.