Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Make itervar-values contained in sca- and vec-files available to R #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mbyrenh
Copy link

@mbyrenh mbyrenh commented Jan 30, 2020

Hi,

the commit in this pull request extends the loadDataset function such that the returned dataframe also includes the "itervar"-entries from the scalar/vector files, making it easier to group different runs by simulation parameter values.

The code added to the processLine-method of the ResultFileManager-class is similar to the code regarding processing of run attributes. One rather subtle change is that I replaced the line PROTECT(dataset = NEW_LIST(9)) at the beginning of the exportDataset-method in loadDataset.cc with PROTECT(dataset = NEW_LIST(datasetColumnsLength)), as to me it seems that the "9" was just a hard-coded version of the number of dataset columns.

I am also not familiar with writing R extensions and I am not sure if the call to UNPROTECT(1) is at the right place or if it should occur just after all the itervar entries have been added to the dataframe.

Kind regards,
Martin

@avarga
Copy link
Contributor

avarga commented Jan 30, 2020

Thank you for your contribution, we'll have a look in the next days.

Just as info, we don't actively maintain the R plugin any more, since its creation we became more focused on using Python + Pandas + Matplotlib. We are moving the IDE's Analysis tool to that platform too, i.e. analyses will be programmable in Python. If you are interested, you can find a early demo of it at http://mediaeventi.unipi.it/category/video/Summit-workshop-Omnet-Attila-Torok-September-6-/4fe10ca70f54cde26ebcef44c8782b62/163 , or download OMNeT++ 6.0 previews from omnetpp.org.

@mbyrenh
Copy link
Author

mbyrenh commented Jan 31, 2020

Thank you for the information. I will check the presentation from the Summit.
Sorry, I just accidentally added another commit to this request, as I forgot to create a separate branch. Anyways, the new commit should fix issue #9.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants