Warning
p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)
Reads the contents of a file or URL and creates a p5.Table object with its values. If a file is specified, it must be located in the sketch's "data" folder. The filename parameter can also be a URL to a file found online. By default, the file is assumed to be comma-separated (in CSV format). Table only looks for a header row if the 'header' option is included.
This function returns a Promise
and should be used in an async
setup with await
. See the examples for the usage syntax.
All files loaded and saved use UTF-8 encoding. This method is suitable for fetching files up to size of 64MB.
Examples
Syntax
loadTable(filename, [separator], [header], [callback], [errorCallback])
Parameters
','