Giter Site home page Giter Site logo

solution output about prioritizr HOT 5 CLOSED

prioritizr avatar prioritizr commented on May 21, 2024
solution output

from prioritizr.

Comments (5)

jeffreyhanson avatar jeffreyhanson commented on May 21, 2024

Yeah, I agree it's important but I'm not sure how to include it in returned objects. I suppose one approach would be to add this information to the object's attributes? One can add a variety of info to objects this way.

For example:

# create vector
x <- 1:5
# add attribute
attr(x, "note") <- "information"
# print object
print(x)
# access data in attribute
attr(x, "note")

from prioritizr.

ricschuster avatar ricschuster commented on May 21, 2024

Attributes is certainly one way. Would a named list work too?
Maybe as a standard the first item being the solution raster and the rest with structured order. If the solution raster is NA (cases where no spatial data was supplied) list[[2]] could be the output df? Not sure if that makes sense, I'm just not a big fan of attributes.

from prioritizr.

jeffreyhanson avatar jeffreyhanson commented on May 21, 2024

Yeah, I'm not a big fan of attributes in general either. I really like that prioritizr outputs the Spatial/Raster/data.frame objects as solutions, and the outputs can be immediately used for subsequent analysis. Is there any way we could implement this without resorting to attributes?

from prioritizr.

ricschuster avatar ricschuster commented on May 21, 2024

Not sure. Maybe attributes do make the most sense in this case. Maybe use attributes for now and if we come across a better solution we can adjust?

from prioritizr.

jeffreyhanson avatar jeffreyhanson commented on May 21, 2024

Ok sounds like a plan.

from prioritizr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.