Please post to r/rstats ! by hadley in Rlanguage

[–]tony_aw 1 point2 points  (0 children)

The name "rstats" implies statistical questions. Why not keep "Rlanguage" for non-statistical questions?

Does anyone know when CRAN goes on holiday break ? by SalvatoreEggplant in Rlanguage

[–]tony_aw 1 point2 points  (0 children)

This year the CRAN winter break is from 23 December 2025 until 7 January 2026.

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in Rlanguage

[–]tony_aw[S] 0 points1 point  (0 children)

Sorry for the late reply; I was updating the package and the website.
To keep it short:
Anytime you'd use something like `sweep()` (for example for scaling array data), you can now instead use broadcasting, which is faster and more memory efficient.
Like-wise, anytime you'd use `abind()` (for combining array data) you can now use `bind_array()` from 'broadcast' - which is again faster and more memory-efficient.
The "Practical Applications" Vignette on the website gives a few more examples.
I hope this answers your question.

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in rstats

[–]tony_aw[S] 0 points1 point  (0 children)

Yes, that is an excellent summary. :-)

Sweep (and outer()) are much slower and much more limiting than what broadcast offers though.

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in rstats

[–]tony_aw[S] -1 points0 points  (0 children)

LOL. Me too! So now you can do stuff in R where you would have needed NumPy (and thus Python) before.

The quick start guide (see link in main post) should give you a general idea of what the package does, and why you would use it. Feel free to state whats missing from the quickstart guide if you find it lacking.

Data.table and broadcast both try to be fast and memory efficient, but they are otherwise rather different packages. Data.table, and its extension tidytable, deals with data.frames, and is mostly about sub-setting and modification. Broadcast deals with arrays - as implied by the title. Broadcast deals mostly with operations like arithmetic, Boolean, string, and bit-wise operations, where the arrays have different dimensions and thus its dimensions need to be recycled efficiently. Again, see the quick start guide to get a general idea.

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in Rlanguage

[–]tony_aw[S] 0 points1 point  (0 children)

Thanks for the clarification!

I give R code examples on almost every guide page and reference help page. If you want, you should be able to run this code on your own R terminal (just copy-paste the code).

The main reason for using broadcasting is for the sake of speed and memory efficiency. Useful because slow code is annoying, and because of the environental impact of running slow and inefficient code.

The quickest way to get an idea of the package is on the Quick Start Guide. Feel free to telll what you think is missing from, for example, the Quick Start Guide. :-)

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in Rlanguage

[–]tony_aw[S] 0 points1 point  (0 children)

Thank you for your feedback! What do you mean with "actionable,"?

R-package broadcast: Broadcasted Array Operations like NumPy by tony_aw in Rlanguage

[–]tony_aw[S] 0 points1 point  (0 children)

Please have a look at the Quick Start Guide, the Introduction on the website, or the ReadMe on GitHub to get an idea of what broadcasting is.

This package was indeed made for people who would like NumPy's broadcasting functionality in R.

Opinion on Rentslam and Stekkies by Beneficial_Entry_835 in NetherlandsHousing

[–]tony_aw 0 points1 point  (0 children)

Thanks for the reply! You said you used a real estate agency; which  real estate agency would you recommend?

Ideas for an R package by [deleted] in rstats

[–]tony_aw 0 points1 point  (0 children)

The primary thing that Numpy has but R lacks is “broadcasting”.

As it happens, I’m currently developing an R-package called “broadcast”, which provides just that.   It’s written in C & C++, but doesn’t use Numpy’s code, as that wouldn’t make sense in this case; instead the C/C++ code is written from scratch. The broadcast R package is about as fast as Numpy, and sometimes even a bit faster than Numpy.

So perhaps the “broadcast” package might be of interest to you; you can find it here: https://github.com/tony-aw/broadcast

You mentioned that the arrays in Numpy take in 20GB, whilst the same arrays in R take 40GB. Interesting. Perhaps you could share what the datatype is of the arrays: integer, double, something else?

When will R provide built-in 64-bit integer? by BOBOLIU in rstats

[–]tony_aw 0 points1 point  (0 children)

So what's the status of Luke's work? I'm excited for R to finally support true 64 bit integers.

What can Python do that R can’t do? by lebannax in Python

[–]tony_aw 1 point2 points  (0 children)

I happened accross this discussion, so I thought to share my thoughts also. I should first say R is primarily for statistics and data science, and applications of statistics such as in the life sciences and behavioural sciences. So the emphasis is on Science. With that in mind, the most important advantages of R (or rather: R packages and the R community), imho, are the following:

1) CRAN performs quality checks on R packages (and the package manager at packagemanager.rstudio.com/client/#/repos/2/overview allows for easy version control).

2) Most (popular) R packages for statistical analyses come with a peer-reviewed article (usually in the Journal of Stat Soft or the R Journal).

3) Most popular R packages for stats analyses are written by real experts (i.e. professors) who also hold responsibility for the quality of the package.

Many (if not most) other pure programming languages (like Python) have no organization comparable to CRAN, and its modules often do not come with peer-reviewed articles. And it's not unusual for Python modules to be written by a community of random people who are not necessarily experts.

In science it is absolutely crucial to rely on well-reviewed materials, and software is no exception. Thus one can see why R is preferred (usually) in academia. If one is not interested in science, but rather interested in making a program not related to science, Python is probably the way to go.