Earlier 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 :-)
One Year with R
211–220 of 266 posts
Re: One Year with R
#212R, 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…
This is just a quick example - I would be grateful if people could recreate this brief look at UK COVID figures in another language: library(tidyverse) library(scales) download.file(url = "https://api.coronavirus.data.gov.uk/v2/data?areaType=overview&metric=covidOccupiedMVBeds&metric=newAdmissions&metric=newCasesBySpecimenDate&metric=newDeaths28DaysByDeathDate&metric=newPeopleReceivingFirstDose&format=csv", destfile…
It revealed to me that there's a buglet in `forcats::last()` (https://github.com/tidyverse/forcats/issues/303) and made me wonder if `pivot_longer()` should be able to rename the columns as you pivot them (https://github.com/tidyverse/tidyr/issues/1338)
Re: One Year with R
#213Earlier quoted context omitted.
My wife is a researcher and started delving into doing her own statistical analysis. It's be fun (and frustrating) learning R with her. I agree that dplyr and the tidyverse are some fantastic packges for a software engineer who thinks about spreadsheets as SQL tables. I would say the most frustrating part about RStudio is that it is a workbook where you can execute code based on your cursor. For my wife, these workbo…
Here are two good strategies: 1. Always run from the top, using the "run previous chunks" button. When this gets too slow, you know that it's time to think harder about your workflow. For a more extreme version of the same idea, regularly restart R using Ctrl-Shift-0, and run from the top. It'll ensure your code is working right. 2. Have a setup chunk that always gets you to the same state. Make sure every other chun…
Re: One Year with R
#214Re: One Year with R
#215Earlier quoted context omitted.
I'm not OP. To me, it's the tooling around it. Everything is done in R-studio and it's focus is to generate statistical documents. The result is a sub optimum solution. It lacks good tooling around installing and running R programs. R programs don't import, they include. It doesn't make it more readable. R-studio is very Emacs like in the sense that it just lacks a decent editor. Due to R-studio being the default, th…
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…
Re: One Year with R
#216Earlier 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
#217Earlier quoted context omitted.
Do you have any specific examples that illustrate the general problem? I'd love to better understand what you're looking for in docs.
He may be right in specific instances, but I think he's way wrong in general. Tidyverse is generally a triumph of documentation, and part of that is that it doesn't tell you too much. Lots of how-to, not too much implementation detail. It's appreciated.
It's probably possible at least in theory to structure docs so you have a terse section followed by a verbose section for each thing, but I've yet to develop the discipline or the competence to pull that off remotely regularly.
Maybe in another 15 years.
Re: One Year with R
#218Earlier quoted context omitted.
> how use of R is more complex when you’re largely ignorant of the tidyverse This. I'm interested in non-flamewar non-religious reasons that the tidyverse is bad. He does give some. I think his complaints about inconsistency and a moving target have some validity. However, the price of not using tidyverse is (roughly) paid in the rest of the article. I would definitely not use R without it. Read his Section 5 on the…
> I'm interested in non-flamewar non-religious reasons that the tidyverse is bad. Going to answer with a question: Why is tidyverse == R considered true? I use ggplot frequently, but for data manipulation data.table is orders of magnitude more powerful. And more stable.
Re: One Year with R
#219I love R more than any other language I have ever used. Perhaps more than any piece of software I've ever used. All of these points are valid, and yes, it's messy, and if you try to write the same type of code that you would in Python, it will frustrate you. And yet.. it somehow works. It makes data analysis and statistical modelling a pleasure. It somehow gives off a sense of lightness, and makes it easy to investig…
An important factor not often mentioned is that I think R really helps individual developers/very small teams to be productive.
Re: One Year with R
#220It's a good reading but some of the complaints are hard to understand. For example, in 4.5.1: Selecting and deleting at the same time doesn’t work either. For example, data[c(-1, 5)] is an error. What would it mean for that to work? He seems to acknowledge that "selecting and deleting at the same time" doesn't make sense in 4.11.1 Can you guess what data[-1:5] returns? I can’t either, so don’t ever try it. If you mus…
It annoys the shit out of me in python. I much prefer perl's
for my $x (@array) { ... }
or ES6's for (let x of array) { ... }
Note that given python and ruby only do function level scoping rather than block level, I can -understand- why they work the way they do even if it annoys me. R already has the necessary granular scoping to do the (IMNSHO) sensible thing so it seems like a pointless wart.My -guess- would be that if it was intentional, it came about in R because for loops are rare enough that you want to know the last index more often than you don't because if you don't care about the index presumably you'd've written something else.
(also you could argue the ES6 version would be better written using 'const', but I've lisped sufficiently my fingers invariably generate 'let' when left to their own devices - caveat emptor)