Hi Helene,

In this case it seems the csv file is hardcoded in the R script:

https://github.com/openmole/openmole-market/blob/7-dev/R-hello/test.R

it's always reading from "data.csv" regardless of the second command
line argument

you can either update the R script and repackage or make sure `input`
get written as "data.csv" in the CARETask

...

    inputFiles += (input, "data.csv"),

...


Cheers

J


On 29/06/17 14:51, Hélène Arduin wrote:
> Hi,
>
> I've been trying to run the Hello World in R
> <http://www.openmole.org/Documentation_Market%20Place_R.html> example,
> since I think it's supposed to do what I want my own code to do, but
> it's not working well.
>
> First I had to repackage the R code to produce a .tgz.bin archive, the
> .bin doesn't work even when I try to repackage it (seg fault).
>
> With the .tgz.bin archive, the RFiles.oms is executed and I get result
> files.
> From what I understand, the R code should be run with each of the
> three data files of the "data" repo as input, however it is always run
> with the data.csv input. Only the names of the three data files are
> used to name the result files (data1_1.csv ; data1_2.csv ; data2_1.csv
> etc), but not the actual data inside.
> Is this the expected behavior?
>
> I've tried to modify the RFiles.oms (see below) in order to vary the
> input files and read each of the three files from the "data" repo but
> it's not a success...
>
> // R task
> val rTask = 
>   CARETask(workDirectory / "care.tgz.bin", "R --slave -f test.R --args
> ${i} *${n}*") set (
>     i := 42,
>     (inputs, outputs) += (i, n),
>     inputFiles += (input, "*${n}*"),
>     outputFiles += ("results.csv", output)
>   )
>
> (I've also modified accordingly the test.R file and repackaged
> care.tgz.bin.)
>
> Does anyone have an idea of how to read different input files on each
> iteration of the model?
>
> Thanks!
>
> Hélène
>
>
> _______________________________________________
> OpenMOLE-users mailing list
> [email protected]
> http://fedex.iscpif.fr/mailman/listinfo/openmole-users

-- 
Jonathan Passerat-Palmbach, PhD
Research Associate
Department of Computing
Imperial College London

South Kensington Campus
Huxley Building - room 344
180 Queen's Gate
London SW7 2AZ

https://jopasser.at

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
OpenMOLE-users mailing list
[email protected]
http://fedex.iscpif.fr/mailman/listinfo/openmole-users

Reply via email to