R, and by R I mean R+tidyverse, is the world's best graphing calculator attached to an OK scheme. To which I mean R is a highly optimized, well-oiled machine if you're using it for its highly-optimized, well-oiled purposes. I tend to have notebooks full of tiny fragments like this dat_min %>% group_by(ymd = make_date(year(date), month(date), day(date))) %>% summarize(vol_btc=sum(vol_btc), vol_usdt=sum(vol_usdt), trad…
> best graphing calculator attached to an OK scheme. I discovered "How To Design Programs" somewhere late in my first year of using R. Like most beginning R coders with nominal experience in other languages, I wrote a lot of monolithic scripts in a very imperative style. HtDP gave me a mental framework for decomposing larger problems into bite-sized chunks. The lispy roots of R lent itself particularly well to the mo…
One Year with R
231–240 of 266 posts
Re: One Year with R
#232The common trope with R is that statisticians and love it and developers hate it. The the main reason that statisticians love it is that the libraries useful to them are much better in R than elsewhere (though Python keeps encroaching in that turf, and "real developers" dislike Python a lot less than they do R). The main reasons that developers hate it is that it is very unlike almost all other languages that they're…
> it doesn't help that almost nobody learned R as their first computer (as opposed to statistics) language. Aside from two statisticians I had as professors, I am yet to meet someone with deep understanding of statistics who doesn't speak R as first language ... I found it way easier to grasp the meaning of statistics by playing with R than by reading the maths.
Re: One Year with R
#233Earlier quoted context omitted.
I use Vim with the R command line wrapped around Makefiles. I don't even have RStudio installed. Works great. I can even pop up an interactive R command prompt session and do whatever I want in it, even quick ggplot2 graphs. Help shows up just as you would expect, and plots pop up in new windows. RStudio is much less advanced than people think it is, it's really just managing R's windows for you and doing generic IDE…
Do you have notes or documentation on how to get this working without RStudio? Preferably on a Macbook?
I'd also look into the "knitr" package, which is what all of the Rmarkdown is based around. So for instance, most of my Makefiles are based around a simple command like:
R -e "library(knitr); knit2html('index.Rmd')"
Then I just code using VIM on index.Rmd. You can probably set this up however you like with the R command line.For interactive it literally is just typing "R" in the command prompt. For help, things like "?ggplot", "??knitr", or whatever, so you can open multiple interactive sessions like you were using IPython or something. When you print a plot, it just pops up in a new window.
You can also use "R" to just execute R raw if you are trying to do it without Rmarkdown. I just prefer the HTML output. Pretty sure all the RStudio RMarkdown stuff just calls knitr as well.
The output looks the same as anything on RPubs (and there is a way to publish to RPubs, I used to have to do that at one point), random one from the first page:
Re: One Year with R
#234Earlier quoted context omitted.
Ha ha, I love that this is your only comment here! Thanks for all your work on R. I came here with sleeves rolled up to defend the language, but was pleasantly surprised to find it was already being done much better than I could have. It's interesting to see how R elicits such a reaction to some programmers. I think it's frequently misunderstood, and R needs to be used in a particular way to allow it to fly. When I'v…
Have you seen https://dtplyr.tidyverse.org ? It gives you the syntax of dtplyr and (almost all of) the speed of data.table.
Re: One Year with R
#235Earlier quoted context omitted.
Any chance of sharing which tool(s)? I know some people who're involved in making the haskell ecosystem a better place for less mainstream users and I'm pretty sure they'd want to know more about this. (and if it turns out they already know, -I- don't, and that sounds pretty cool and fun to read up on :)
Sure! It’s the department of archaeogenetics at the Max Planck Institute for Evolutionary Anthropology https://poseidon-framework.github.io/#/
Cheers!
Re: One Year with R
#236Earlier quoted context omitted.
Sure! It’s the department of archaeogenetics at the Max Planck Institute for Evolutionary Anthropology https://poseidon-framework.github.io/#/
Much appreciated, passed on in the hopes it's useful, and when it's not 0030 and I'm awake enough to actually understand any of it I'll be having a read through myself. Cheers!
Fwiw, it’s mostly a tool for parsing and processing this ‘Jan no’ data schema https://poseidon-framework.github.io/#/janno_details
Re: One Year with R
#237Earlier quoted context omitted.
Is there a tutorial someplace that explains how ggplot actually manages plotting? Or the architecture and layers between the high level code and how a plot is drawn? Meaning, I love being able to express what I want and ggplot figures out a good plot for me. But I know there are many layers that can be manipulated, but I just don’t understand the layers. One of the best compliments I can think of is that with ggplot,…
That should be covered in the original A layered grammar of graphics paper: https://vita.had.co.nz/papers/layered-grammar.html And then there is an entire ggplot2 book (there are many, but this one was written by Hadley): https://ggplot2-book.org/
Re: One Year with R
#238I've written an interpreter for R (a subset; it was for school and I left out some features like S4 and the condition system) so I have done some pretty deep dive into the language reference and GNU R source. I agree with the author's sentiment - I love a lot of what R has, but there is a lot of small madnesses. There are so many unique PL ideas in R (may not actually be unique but certainly unique among common langu…
Is the subset R interpreter you wrote available on the net?
Re: One Year with R
#239Earlier quoted context omitted.
> almost as bad as typical Python docs I found numpy, scipy, pandas, and plotly docs to be quite clear and extensive. The only docs I have found to be confusing are matplotlib's and the Python standard library's. Not sure what packages you are referring to?
On the other hand, I'm curious what you've found to be lacking about the standard library documentation. I've found it to be generally very thorough, in some cases fantastic, though there's an occasional weak point.
Also, the built-in types are documented in one page, going from boolean to sequence types and even type annotations. Every Ctrl + F gives me 20 different results, which is annoying as hell.
Re: One Year with R
#240Earlier quoted context omitted.
There is an better alternate universe where xlisp-stat doesn't fall behind and S doesn't happen.
Interestingly, there appears to be an attempted reboot: https://lisp-stat.dev/ My first reaction, is "why not on a modern Scheme as opposed to Common Lisp" and in so thinking, I have demonstrated exactly why no lisp / scheme has ever achieved critical mass :-)