Marc Kaufmann

28 posts

Marc Kaufmann banner
Marc Kaufmann

Marc Kaufmann

@grand_schemer

Behavioral Economist @CEU | Data skills rated R | Racketeer (@racketlang)

Vienna Katılım Ekim 2022
104 Takip Edilen91 Takipçiler
Marc Kaufmann retweetledi
QJE
QJE@QJEHarvard·
Recently accepted by #QJE, “Understanding Markets with Socially Responsible Consumers,” by Kaufmann, Andre, and Kőszegi: doi.org/10.1093/qje/qj…
English
0
15
66
10.4K
Marc Kaufmann retweetledi
Aleksandr Volodarsky
Aleksandr Volodarsky@volodarik·
ChatGPT has crossed 1M+ users in just 5 days. To compare, it took Netflix 41 months, FB - 10 months, and Instagram - 2.5 months. But many haven’t yet realized its full potential. Here are the 10 mindblowing things you can do using it right now:
English
914
9.3K
45.1K
0
Marc Kaufmann retweetledi
Robert Lepenies
Robert Lepenies@RobertLepenies·
Genau jetzt ist die Zeit für Hochschulen, Schulen, Journalismus, Marketing, Kommunikation, GPT-3 ernst zu nehmen. Ich fange mal mit Hochschulen an, da von Job her Hochschulpräsident ;D
Deutsch
56
441
1.4K
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@kennedymwavu @arieda_muco @korenmiklos @AsjadNaqvi Thanks, that works for the use case as I stated it. The problem is there is actually more text after 'Team R', e.g. 'Team R ...'. In the end, I used a regex, but this approach is nice for one-to-one custom matchings.
English
0
0
2
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@adriaaaaaaan @arieda_muco @korenmiklos @AsjadNaqvi Thanks, that works for the example I gave - although in the actual example there is additional stuff after, e.g. "Team R ...". But that made me think of regex, which works: mutate( convincing = str_match( convincing, "Team ([A-Za-z]+)")[,2] ) )
English
0
0
4
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@arieda_muco @korenmiklos @AsjadNaqvi Question to #RStats: what is a clean way to replace the `case_when` in `mutate` by a single line (function call or otherwise)? Assume that `convincing` is a column of "Team R", "Team Stata", or "Team Python" strings. My attempt defines a non-trivial function `get_lang`.
Marc Kaufmann tweet mediaMarc Kaufmann tweet media
English
3
2
4
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@arieda_muco @korenmiklos @AsjadNaqvi I don't think so, since for loops in R don't return their values. I found a way using `detect` and defining a vectorized function so that it can be applied inside a `mutate`, but it was really finicky and hard to read. (You refer to the `case_when` in my code, right?)
English
1
0
1
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@korenmiklos @AsjadNaqvi The R code's pretty nice in my opinion (said the proud father). Still beat you by a silly line of code while packing more info! 😀
English
0
0
2
0
Marc Kaufmann
Marc Kaufmann@grand_schemer·
@korenmiklos Re: LoC (silly metric, but OK). My code is 18 LoC (5 lines are to relabel data I am not yet using, but might later). I could shave off more by putting a lot of `ggplot` code in one line (😉 @AsjadNaqvi).
Marc Kaufmann tweet media
English
2
0
3
0
Marc Kaufmann retweetledi
Tim Tiefenbach
Tim Tiefenbach@TimTeaFan·
@thomas_neitmann I’d say that’s totally ok. I have R version 4.1 at work for quite some time now and I haven’t used the native pipe in any of my workflows yet.
Tim Tiefenbach@TimTeaFan

I see still a lot of #RStats tweets about the base pipe vs. the {magrittr} pipe, often in favor of the former. I have to admit: I still stick to the magrittr pipe and here is a Tweetorial on why. 🧵 %>%

English
0
1
7
0
Marc Kaufmann retweetledi
Arieda Muço
Arieda Muço@arieda_muco·
Python, vs. R vs. Stata: Who wins? With my colleagues, we are going to have a heated debate on the merits of each language... Moderated by @GaborBekes. Spoiler alert!!! Python will win✌️: 4/6 debaters are Python users. Short 🧵
English
1
7
32
0