Git Product home page Git Product logo

Comments (4)

zkamvar avatar zkamvar commented on September 26, 2024 1

This has been fixed. There was something weird with match.fun(), but setting descend = FALSE did the trick. I also added a new feature that would give you what I'd hope you'd expect.

For future reference, if you find a bug that stemmed from a new feature, please raise a separate issue; it makes things easier to track down.

from poppr.

zkamvar avatar zkamvar commented on September 26, 2024

Why did you reopen this? This issue was fixed in #57.

from poppr.

knausb avatar knausb commented on September 26, 2024

Documentation states that the function poppr.msn() will accept a vector of colors. I may have found an exception.

A.dist <- diss.dist(Aeut)
A.msn <- poppr.msn(Aeut, A.dist, gadj=15, vertex.label=NA)

From examples works.

RColorBrewer::brewer.pal(n=3, name = 'Set3')
A.msn <- poppr.msn(Aeut, A.dist, gadj=15, vertex.label=NA, palette=RColorBrewer::brewer.pal(n=3, name = 'Set3'))

Throws an error.

Error in PAL(npop) : invalid argument type

Is poppr.msn trying to interpret this as a function instead of a vector of colors?

Thanks!

from poppr.

zkamvar avatar zkamvar commented on September 26, 2024

That's an interesting problem. The function responsible for figuring out if a palette is a vector or function is [palette_parser](

palette_parser <- function(pal, npop, pnames){
<
palette_parser <- function(pal, npop, pnames){
). It's strange that it would throw that error. In fact, it should throw a warning.

I'll have a look at this later.

Zhian

On Mar 29, 2016, at 09:30 , Brian Knaus [email protected] wrote:

Documentation states that the function poppr.msn() will accept a vector of colors. I may have found an exception.

A.dist <- diss.dist(Aeut)
A.msn <- poppr.msn(Aeut, A.dist, gadj=15, vertex.label=NA)
From examples works.

RColorBrewer::brewer.pal(n=3, name = 'Set3')
A.msn <- poppr.msn(Aeut, A.dist, gadj=15, vertex.label=NA, palette=RColorBrewer::brewer.pal(n=3, name = 'Set3'))
Throws an error.

Error in PAL(npop) : invalid argument type
Is poppr.msn trying to interpret this as a function instead of a vector of colors?

Thanks!


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub #55 (comment)

from poppr.

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.