« Because it's Friday: Current Status | Main | In case you missed it: October 2016 roundup »

November 14, 2016


Feed You can follow this conversation by subscribing to the comment feed for this post.

Oops! Look at n=3, 30 + 300 = 330 (not 300!)

An alternative in R that avoids the $ ugliness would be

input <- within(input, z <- x + y)

This also extends much more gracefully to more complicated adjustments, and %>% pipes.

Hi Bill, Thank so much for pointing out the error and suggesting better R code. All pictures have been updated following your comment.

FYI for the rest of readers, we originally had 30 + 300 = 300 in the two screenshots and they have been corrected. Bill's recommended R code replaced the "ugly" version of input$z <- input$x + input$y

Thanks so much.

The comments to this entry are closed.

Search Revolutions Blog

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr