You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2016/02/17 09:19:18 UTC

[jira] [Commented] (SYSTEMML-526) Allow read iofilename to be non-constant value

    [ https://issues.apache.org/jira/browse/SYSTEMML-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150095#comment-15150095 ] 

Matthias Boehm commented on SYSTEMML-526:
-----------------------------------------

yes this would be a useful feature - currently we only support in-memory udfs for that matter (org.apache.sysml.udf.lib.DynamicReadMatrixCP).

> 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)