spholmes / F1000_workflow

43 stars 33 forks source link

Colors do not appear in prevalence plot any more #5

Open spholmes opened 8 years ago

spholmes commented 8 years ago

Also, could we replace this inelegant programming which is wasteful in space: plyr::ddply(prevdf, "Phylum", function(df1){mean(df1$Prevalence)}) plyr::ddply(prevdf, "Phylum", function(df1){sum(df1$Prevalence)})

with something that produces just one output with the two columns (pipe challenge maybe here?)

joey711 commented 8 years ago

I would normally do that with data.table, much more elegant and easier to read. I wanted to avoid adding that extra dependency.

Why is two lines of code v. a compound line of code worth worrying about here?

spholmes commented 8 years ago

It's not the two lines of code it's the two separate outputs that take up space that I am trying to trim down.

On Tue, Aug 16, 2016 at 12:04 PM, Paul J. McMurdie <notifications@github.com

wrote:

I would normally do that with data.table, much more elegant and easier to read. I wanted to avoid adding that extra dependency.

Why is two lines of code v. a compound line of code worth worrying about here?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spholmes/F1000_workflow/issues/5#issuecomment-240204603, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJcvfUqpGAI5h1kA9kWjTULm7vCLDWGks5qggmigaJpZM4JlvOj .

Susan Holmes Professor, Statistics and BioX John Henry Samter Fellow in Undergraduate Education Sequoia Hall, 390 Serra Mall Stanford, CA 94305 http://www-stat.stanford.edu/~susan/