You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Deron Eriksson (JIRA)" <ji...@apache.org> on 2016/02/17 00:58:18 UTC
[jira] [Created] (SYSTEMML-526) Allow read iofilename to be
non-constant value
Deron Eriksson created SYSTEMML-526:
---------------------------------------
Summary: Allow read iofilename to be non-constant value
Key: SYSTEMML-526
URL: https://issues.apache.org/jira/browse/SYSTEMML-526
Project: SystemML
Issue Type: Improvement
Components: APIs
Reporter: Deron Eriksson
Currently, the write statement supports variable iofilenames but the read statement does not. For flexibility (such as looping over multiple data files), it would be nice to be able to use iofilenames containing variable values that can change.
The following code works. It shows how we can write to 3 separate files, but here we're reading from only 1 file.
{code}
for (i in 1:3) {
m = read("mydata-1.csv");
n = m + 1;
write(n, "myresult-" + i + ".csv", format="csv");
}
{code}
If I try to read from 3 separate data files utilizing the i variable, I get an error:
{code}
for (i in 1:3) {
m = read("mydata-" + i + ".csv");
n = m + 1;
write(n, "myresult-" + i + ".csv", format="csv");
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)