Re:Will R Work on Apple Silicon?
by hyperbovine on Wednesday November 11, 2020 @12:28PM
(#25060440)
R is a but of a horror show under the hood, I agree, but if you're just an end user doing data analysis, consider:
versus
I could go on...
[ Parent
| on HN ]
You could have done
flights[['year', 'month', 'day']].head(10)
which is not so different from standard R head(flights[c("year", "month", "day")], 10)
but it's true that the following may be nicer flights[1:10, c("year", "month", "day")]
(by the way using head(10) is not the same as indexing 1:10 if there are less than 10 rows)
Re:Will R Work on Apple Silicon?
by totalperspectiv on Wednesday November 11, 2020 @12:55PM
(#25060802)
I totally agree that it is a very efficient and powerful tool for ad-hoc data analysis. It's just not what I would view as a responsible choice for production / publication code.
Re:Will R Work on Apple Silicon?
by superbatfish on Wednesday November 11, 2020 @02:36PM
(#25062014)
flights[["year", "month", "day"]].head(10)
Re:Will R Work on Apple Silicon?
by empthought on Wednesday November 11, 2020 @11:56PM
(#25066596)
Itβs pretty sad that both are worse than
SELECT year, month, day
FROM flights
LIMIT 10SELECT before FROM isn't really a good thing.
Re:Will R Work on Apple Silicon?
by _Wintermute on Wednesday November 11, 2020 @02:38PM
(#25062030)
That's a very dishonest example. Yes, terribly written pandas code looks terrible.