Better HN
topnewbestaskshowjobs
Log inSign up

hazexp

17 karma · joined May 18, 2009 (17y ago) · 12 submissions

Submissions

comment 13y ago · link · parent

It depends.

For statistical graphics, it is hard to beat R simply because it has all of the statistical functionality built right in. Want an ACF plot for your ARMA model? No problem. To do this in D3 requires a lot more code. R also has the great package ggplot2, which is simply brilliant for constructing plots.

Where D3 shines is the ability to add interactivity and animation to its plots. R simply has no concept of this as it is only really capable of static graphics.

If you know neither system, I would probably suggest D3 because you're going to have to learn a graphics system anyway. With D3 at least you have the ability to construct more than just static graphics. Also, it's all JS so most people are going to find it easier to learn than R.

comment 13y ago · link · parent

The bonus with D3 is that (2) is up to you. Seeing as it's constructing SVG, you just need to design a plot such that it looks unique. I have a feeling that the reason why D3 sites look similar is due to copy & paste coding (which is adequate for most people).

comment 13y ago · link · parent

I think the point is that R can do both statistical analysis and graphing. You don't need ggplot2 to produce good plots in R, however, I do agree that ggplot2 is a very good graphics package.

Regarding ggplot2 and D3, it's already possible to draw ggplot graphics in the browser, consider looking at the following two repositories:

https://github.com/hadley/r2d3 https://github.com/gigamonkey/gg

You'd probably want to speak to Hadley for more information on his goals, regarding ggplot2 & D3. I'd certainly like to try out any combination of these tools.

comment 14y ago · link · parent

Also, they can be combined into one HTTP request.

comment 14y ago · link · parent

If you're interested in good references for being able to produce `visual stories' I suggest you have a look into the R package `ggplot2' [1].

It's a great way (although a little challenging at first) of being able to produce almost all of the types of plots you're interested in creating. The author of the package also wrote a great book [2] on the package which is worth a read.

A note though, most information on `ggplot2' isn't really aimed at informing you which is the most appropriate plot, merely that a type of plot can be quickly produced.

[1] http://had.co.nz/ggplot2/

[2] http://www.amazon.com/gp/product/0387981403?ie=UTF8&tag=...

comment 15y ago · link · parent

As does R :)

    > c(1, 1, 1) + c(2, 2, 2)
    [1] 3 3 3
    > matrix(c(1, 1, 1, 2, 2, 2, 3, 3, 3),
    +        ncol = 3, byrow = TRUE) +
    + matrix(c(4, 4, 4, 5, 5, 5, 6, 6, 6),
    +        ncol = 3, byrow = TRUE)
         [,1] [,2] [,3]
    [1,]    5    5    5
    [2,]    7    7    7
    [3,]    9    9    9
Not quite so concise and elegant but it's pretty straightforward stuff for most R users.

comment 15y ago · link · parent

There's an easy to way to remember which is which. GrEy is English, grAy is American.

comment 15y ago · link · parent

I suspect it's because it's the most relevant.

For me personally I wouldn't be interested in using anything besides the most accurate prediction. However, I would probably make the alternative hypotheses available to choose in case the best prediction is incorrect. In that case I can only assume that the hypotheses are listed in decreasing order of confidences.

9.

Exploring R's function call semantics(sjp.co.nz ↗)

1 points · by hazexp · 16y ago · discuss

comment 16y ago · link · parent

It also drastically lowers the amount of processing overhead per page served, after all, there's no dynamic code to process nor are there any database queries to execute.

comment 17y ago · link · parent

I personally didn't find the learning curve to be that high. Perhaps because I was in a course learning taught by one of the founders of the R Project ;).

The lecture slides he created were great, and I recommend anyone that is interested in R to have a look at them: http://www.stat.auckland.ac.nz/~stat380/?Lecture_Slides

comment 17y ago · link · parent

Auckland, New Zealand.