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

Mike Dusenberry commented on SYSTEMML-526:
------------------------------------------

+1

> 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.15#6346)

Reply via email to