Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hadley
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
241.
▲
by
hadley
12y ago
There's also the confusingly named ggplot (for python): https://github.com/yhat/ggplot
242.
▲
by
hadley
12y ago
Take a look at the testdat package which provides some tools in the direction.
243.
▲
by
hadley
13y ago
It should work with any plot that has a y range greater than 0. ggplot2 can't do anything to fix the fact that log(x) for x <= 0 is undefined.
244.
▲
by
hadley
13y ago
In SAS, beware that missing values are treated as the smallest possible value (e.g. -Inf). This means that statements like x < 10 return true if x is missing.
245.
▲
by
hadley
13y ago
I think it's a bit of a stretch to say that your opinion of ggplot2 is unanimous. Obviously I'm rather biased, but I think there is some evidence to suggest that once you understand the grammar of graphics based approach, you can
246.
▲
by
hadley
13y ago
Python is definitely not the de facto choice. Python and R both have strengths and weaknesses, and relative use depends quite a bit on community. A few recent surveys ( http://blog.revolutionanalytics.com/2014/01/in
247.
▲
by
hadley
13y ago
That chapter (like the entire book) is still a work in progress and I'll hopefully fix the most egregious errors before publication ;)
248.
▲
by
hadley
13y ago
Also load returns (invisibly) the names of the objects it loaded, so `(load(...))` will print them out.
249.
▲
by
hadley
13y ago
Maybe it's just me, but I find the number of ways to get python libraries to be very confusing. Do you use an egg? distutils? pip? easy_install? I just skimmed the first few google results for "install python module windows"
250.
▲
by
hadley
13y ago
Yes, save and load suck, and I never use them (and encourage others to avoid them too). Use saveRDS and readRDS instead (and yes those are their totally inconsistent names). (Also the documentation for load does tell you where the objects
251.
▲
by
hadley
13y ago
Connecting to databases in R is way harder than it should be. It's something I want to work on in the future.
252.
▲
by
hadley
13y ago
I really don't think R the language is poorly designed. Sure the implementation isn't great, and the standard library is patch and inconsistent, but the core of the language is elegant and well-suited to its domain (which is not j
253.
▲
by
hadley
13y ago
I don't think you can judge a language completely in isolation from its community. There are features of R that make it particularly well suited for statistical computing (vector-oriented, missing values at fundamental level, ...). Tho
254.
▲
by
hadley
13y ago
R also is considerably better than python at distributing windows binaries. About 70% of R users are windows, and many statistics packages have some C/Fortran code, so this is really important in terms of putting the tools in the hands
255.
▲
by
hadley
13y ago
No, because it will be for sale eventually, and that's the deal I struck with my publisher. But if you dig around in https://github.com/hadley/adv-r you can find a script to make a single pdf...
256.
▲
by
hadley
13y ago
I think R is actually a rather great first language, as the focus is usually on doing cool stuff, rather than developing a rigorous framework for programming. It's more important to put motivation before rigour, since if you focus only
257.
▲
by
hadley
13y ago
I don't think saying R is not a "real" is a fair characterisation. It is not a domain-specific language in the sense the term is commonly used (SQL and ggplot2 are domain specific languages, R is not). R is a real programming
258.
▲
by
hadley
13y ago
I think R is a lot like JavaScript: there's a beautiful language at its heart, but it's surrounded by layers of cruft. It doesn't help that most people using r are not programmers.
259.
▲
by
hadley
13y ago
I'd love to see an example of that - I agree that you might have to do some data transformation to use ggplot2, but I think the net effect is still fewer lines of code than with base graphics (except for v. simple graphics). Some clari
260.
▲
by
hadley
13y ago
You're very welcome!
261.
▲
by
hadley
13y ago
Something like 70% of R users are on windows.
262.
▲
by
hadley
13y ago
Your pollution is my tidy-ness: http://vita.had.co.nz/papers/tidy-data.html .
263.
▲
by
hadley
13y ago
As far as I know, the majority of the speed improvements come from a proprietary on-disk data store, accompanied by high-performance statistical algorithms built on top of it. You need to use their packages to take most advantage of the spe
264.
▲
by
hadley
13y ago
R core is generally motivated by ensuring that R continues to work as is, not by improving performance. You can argue whether or not this is a good idea, but in the absence of a comprehensive unit test suite, it's pretty hard to impro
265.
▲
by
hadley
13y ago
It was my understanding that R basically already does implement call-by-name - arguments to a function are passed by name and looking up in the calling environment until you first modify them. Is my understand incorrect, or do Algol 60
266.
▲
by
hadley
14y ago
I'm working on a curriculum for basic programming in R, hopefully that will eventually help outline what everyone should know about R, regardless of what they use it for.
267.
▲
by
hadley
14y ago
Agreed, but it's hard to know in advance what features will be useful, and once a language is established, it's hard to remove less-used features without breaking existing code.
268.
▲
by
hadley
14y ago
I think a big problem is not just the language, but how it's usually taught - in other words, I think you shouldn't need such a large vocabulary if you learn the right primitives (which don't always exist in base R). The lack of a solid co
269.
▲
by
hadley
14y ago
That's a consequence of having first class environments - but given that it's rarely used, shouldn't a sufficiently intelligent compiler be able to optimise it away in the common case? I'm sure I read a paper along those lines, but I can't
270.
▲
by
hadley
14y ago
I'd love to hear what makes R not-fun to develop in. I'm always on the look-out for common pain points.
More ›