Avishai Tsur

279 posts

Avishai Tsur

Avishai Tsur

@AvishaiTsur

Physician (Internal Medicine), educator, and researcher at @SHEBA_. #Rstats enthusiast. Tweets are my own.

Israel Katılım Mart 2020
100 Takip Edilen80 Takipçiler
Avishai Tsur
Avishai Tsur@AvishaiTsur·
@JARS3N @rstatstweet If they all have the same structure, would make sense to load the whole dataset via arrow and then partition them (hopefully also to less files).
English
1
0
0
0
JARS3N
JARS3N@JARS3N·
have a directory of 1200 csvs I converted to feather assuming that the overall file size would be smaller but the difference is 3.6G & 4.52G. Not the result I was hoping for. #R #Rstats #feather
English
2
1
1
0
Simon Willison
Simon Willison@simonw·
If someone gives you a CSV file with 100,000 rows in it, what tools do you use to start exploring and understanding that data?
English
2.2K
830
6.9K
0
Hadley Wickham
Hadley Wickham@hadleywickham·
e.g. rescale_z <- function(x) { (x - mean(x, na.rm = TRUE)) / sd(x, na.rm = TRUE) } squish <- function(x, min, max) { case_when( x < min ~ min, x > max ~ max, TRUE ~ x ) }
English
6
4
60
0
Hadley Wickham
Hadley Wickham@hadleywickham·
What tweetable #rstats function have you written recently to reduce duplication in your data analysis code? I'm looking for some inspiration as I re-write the functions chapter in R4DS.
English
55
43
305
0
Avishai Tsur
Avishai Tsur@AvishaiTsur·
@newdata_learner @rstatstweet 1. The rowwise() identifier is unnecessary here unless you use summarise(). 2. starts_with() and the underline are safer to use. i.e., if you had a variable called width_height_ratio, it would not be selected. 3. Remember to ungroup.
English
1
0
1
0
Félicien Le Louedec
Félicien Le Louedec@FelicienLL·
Hi #rstats folks, I have "introduction to R" courses to prepare, and I'm looking for datasets easy to play with in order to learn data wrangling, visualization etc... What do you use apart from mtcars, iris etc...? Do you have any favorites? Thank you!
English
2
2
2
0
Cristalyne Bell
Cristalyne Bell@CristalyneBell·
Is it just me or when you are learning to code, nothing has the power to wreck your day like dealing with date formats? #SAS #RStats #RLadies
English
14
3
73
0
Art Steinmetz
Art Steinmetz@adababbage·
During development, I am used to rearranging my #rstats #tidyverse pipe chains a lot so I terminate the chain with "{.}" This breaks with the native pipe. What to use instead? Or just stay with "%>%" and reveal myself to be old, like using two spaces at end of sentence? Thanks.
English
3
1
3
0
Dr Fraser Sneden
Dr Fraser Sneden@FraserSneden·
Anyone want to tell me why my (very simple) plot isn't aligning correctly? I don't understand as I've more or less just copied code from elsewhere. The bottom is cut off in the screenshot, but it only has 2 ticks (as it should) #RStats
Dr Fraser Sneden tweet media
English
1
2
1
0
Isidro Landa, Ph.D.
Isidro Landa, Ph.D.@LandaIsidro·
@AvishaiTsur @rstatstweet Oo thanks for the tips! Gonna incorporate that. Is there an equivalent to the dollar signs for prefixes? Or do you simply place it in front to indicate that?
English
1
0
1
0
Isidro Landa, Ph.D.
Isidro Landa, Ph.D.@LandaIsidro·
2 lines of code to replace 52!! To partially rename multiple variables. Always brings me joy to find more efficient ways of doing things. The simple things. #rstats #purrr #tidyverse
Isidro Landa, Ph.D. tweet media
English
3
33
313
0
Georgios Karamanis
Georgios Karamanis@geokaramanis·
TIL that if you do a variable assignment inside parentheses, R prints the variable! #RStats
English
2
6
23
0
Josh
Josh@at_schill_j·
Today in #rstats I learned: the all() function checks a vector and passes true if all items within it are true... I'm a bit ashamed I didn't know that sooner 🥲 RIP to all of the {sum(boolean_vector) == length(boolean_vector)} lines I've written.
English
3
1
1
0
Rachel E. Brenner, PhD
Rachel E. Brenner, PhD@drrachelbrenner·
Hey #rstats community, I'm looking for a guide on importing and cleaning data for use in #tidyverse. More granular/detailed than R for Data Science. Any Recommendations? Hands-On Programming with R?
English
4
6
14
0
Avishai Tsur
Avishai Tsur@AvishaiTsur·
@Kate_J_Fuller @_mikoontz The only reason I know this is because I did the same, and someone enlightened me. So now it is your turn to pass it on :)
English
0
0
1
0
Kate Fuller
Kate Fuller@Kate_J_Fuller·
Give me your under-rated and under-used R function favourites. I'll go first. attributes() #RStats #rspatial
English
8
2
7
0