You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case that a "unit" of information is contained in more than one line, what should be done in the readline method? Intuitively, I would say read the whole unit.
R.
The text was updated successfully, but these errors were encountered:
Buffer the current unit in the instance.
Have a look at biojs-io-matrix
var mParser = new MParser();
mParser.parseLine("A 1");
mParser.parseLine("B 2 3");
var matrix = mParser.buildMatrix();
In the future we should also use streams and there the pattern gets more obvious and easier to understand. However atm I am a bit worried about the increased size when I add them (#1).
input.on("chunk", function(d){
if(d = "--"){
out.write(this.buffer);
this.buffer = [];
}else{
buffer.push(JSON.parse(d)); // adding the current line to the buffer
}
})
In case that a "unit" of information is contained in more than one line, what should be done in the readline method? Intuitively, I would say read the whole unit.
R.
The text was updated successfully, but these errors were encountered: