Comments (10)
Just created a constructor for this S3 object but no generic method yet...
from hospitalnetwork.
Why do you have matrix and edgelist in your object?
from hospitalnetwork.
Well, sometimes we need the matrix (in spreading simulation) and sometimes we need the edgelist (for igraph), so since both are created at one point I thought we could keep them both and let the user choose what he/she wants...
from hospitalnetwork.
But you have methods to go from one to the other, no? You might not want to store the two types in one object as it might take a lot of memory?
from hospitalnetwork.
mydb = create_fake_patientDB(n_patients = 100000, n_hospital = 2500)
hnet = hospinet_from_patient_database(base = mydb, noloops = FALSE)
format(object.size(hnet), units = "Mb") #27.3Mb
format(object.size(mat$matrix), units = "Mb") #24.3Mb
format(object.size(mat$edgelist), units = "Mb") #3.1Mb
we'll know what to remove if we have a memory size issue... ;-)
from hospitalnetwork.
Other question: should not we be able to apply the getMetrics, get_degree... functions on the HospiNet object and not on some igraph object only ?
from hospitalnetwork.
from hospitalnetwork.
I will need to do some reading up here on the difference between S3 and R6 objects, but the last option sounds like the best solution to me, indeed.
As for @nolwenn 's question, it seems most intuitive to be able to apply these functions on the HospiNet object.
from hospitalnetwork.
I've implemented the R6 mechanism. You can see it at work at the end of the work-flow vignette (text of the vignette still needs to be updated...)
from hospitalnetwork.
Brilliant. Hadn't noticed yet... I'm still catching/reading up after being away for a week and a half.
from hospitalnetwork.
Related Issues (18)
- Unit test scripts
- Checking base during edgelist_from_base() HOT 15
- Complete documentation of functions
- new implementation of overlap management HOT 5
- Summary statistics in HospiNet object are actually computed from the original base HOT 6
- Shiny app HOT 3
- Columns for checking duplicated entries HOT 2
- FR: function adding GPS coordinates to HospiNet object
- FR: add fake GPS coordinates in fake database generation function
- circular network not working when only one cluster is present in the network
- Hospitals with no transfers get silently dropped HOT 1
- Fake data HOT 4
- Include (flagged) direct transfers in edgelist_from_patient_database
- Features you want to see in the package HOT 7
- Error when column name equals variable name HOT 2
- a shiny ui frontend to the package
- How overlapping stays are adjusted HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hospitalnetwork.