R_PythonTips's profile picture. Apparently, this user prefers to keep an air of mystery about them.

R and Python Tips

@R_PythonTips

Apparently, this user prefers to keep an air of mystery about them.

Ghim

I would be posting R and Python programming tips. Some handwritten posts and code tips are on the way. Happy programming! #rstats #python


R and Python Tips đã đăng lại

Opened too many tabs but don't want to lose your place by closing *all* of them? Not a problem. #rstats

rstudiotips's tweet image. Opened too many tabs but don't want to lose your place by closing *all* of them? Not a problem. #rstats

R and Python Tips đã đăng lại

One of many goodies in RStudio: if you go into LaTeX math mode ($...$) and you hover over an equation you'll see a beautiful mathematically typeset preview of the equation @rstudio @rstudiotips


R and Python Tips đã đăng lại

Most likely candidates: while ⟶ [ <expr> while <cond> ] try/except ⟶ f(x) except ValueError else default


R and Python Tips đã đăng lại

Over time, many #Python statements have evolved a variant form as an expression: print ⟶ print() function def ⟶ lambda if ⟶ ternary operator for-loop with list.append() ⟶ list comprehension def and yield ⟶ generator expression = assignment ⟶ walrus operator


map() function in python

R_PythonTips's tweet image. map() function in python

map() function in rstats

R_PythonTips's tweet image. map() function in rstats

R and Python Tips đã đăng lại

18.05%?

scthomsn's tweet image. 18.05%?

R and Python Tips đã đăng lại

Thanks to everyone who submitted a solution. I'm glad other people think this sort of thing is fun! Here's my solution, using a BayesTable class that demonstrates Bayes's Theorem: allendowney.blogspot.com/2018/09/tom-ba… More Bayes puzzles coming soon!


R and Python Tips đã đăng lại

I have a box of dice with 4, 6, 8, and 12 sides, the same number of each. I choose one at random, roll it twice without showing you, and report that I got the same outcome both times. If I roll the same die again, what is the probability I get the same outcome a third time?


Purrr's reduce function is so powerful. We can join multiple tables (read it as >2) using two lines of code. List all the tables and pipe it up with <<reduce>>. #rstats

R_PythonTips's tweet image. Purrr&apos;s reduce function is so powerful. We can join multiple tables (read it as &amp;gt;2) using two lines of code. List all the tables and pipe it up with &amp;lt;&amp;lt;reduce&amp;gt;&amp;gt;. #rstats

R and Python Tips đã đăng lại

Been meaning to check out Deep Learning with Keras and R? This post has everything you need to get started: blog.rstudio.com/2018/09/12/get… #rstats #rkeras

posit_pbc's tweet image. Been meaning to check out Deep Learning with Keras and R? This post has everything you need to get started:  blog.rstudio.com/2018/09/12/get… #rstats #rkeras

R and Python Tips đã đăng lại

Writing production #python code: * Simplest thing that works * Consider type signatures * Add repr, copy, and pickle support. * Watch out for circular references * Think hard about concurrency * Handle exotic and unanticipated use cases * Learn from the experience * Repeat


R and Python Tips đã đăng lại

Interested in statistical methods for data science? Check out our probabilistic programming and bayesian methods playlist, including: "Bayesian Network Modeling using R and Python" by Pragyansmita Nayak: youtube.com/watch?v=6pl3m-… Don't forget to subscribe to #PyData on Youtube!

PyData's tweet card. Bayesian Network Modeling using R and Python - Pragyansmita Nayak

youtube.com

YouTube

Bayesian Network Modeling using R and Python - Pragyansmita Nayak


R and Python Tips đã đăng lại

Python or R? Trick question: Both! Check out our PyData video playlist of R talks, including: "A Beginner's Guide to Random Forests - R vs Python" by Linda Uruchurtu: youtube.com/watch?v=fFPsjp… #rstats #scikitlearn #sklearn Don't forget to subscribe for updates!

PyData's tweet card. Linda Uruchurtu: A Beginner's Guide to Random Forests - R vs Python |...

youtube.com

YouTube

Linda Uruchurtu: A Beginner's Guide to Random Forests - R vs Python |...


R and Python Tips đã đăng lại

#python factlet: I learned something new. A "binade" is the set of floating point numbers that all have the same exponent. Presumably, if an addition z=y+x is closed within a single binade, it will be lossless.


R and Python Tips đã đăng lại

These are indeed handy! "RStudio IDE Easy Tricks You Might've Missed" by @lopp_sean buff.ly/2f2hmZt via @rstudio #rstats


To convert row names to column in a data frame we can use <<rownames_to_column(df, var = colname>> from tibble package. #rstats

R_PythonTips's tweet image. To convert row names to column in a data frame we can use &amp;lt;&amp;lt;rownames_to_column(df, var = colname&amp;gt;&amp;gt; from tibble package. #rstats

If we want to compare two data sets, to ensure whether the data matches, we can use setequal() or identical(). The difference is, setequal() wouldn't mind duplicates and/or order whereas identical() will return FALSE on duplicates or mismatch in order between data sets. #rstats

R_PythonTips's tweet image. If we want to compare two data sets, to ensure whether the data matches, we can use setequal() or identical(). The difference is, setequal() wouldn&apos;t mind duplicates and/or order whereas identical() will return FALSE on duplicates or mismatch in order between data sets. #rstats

R and Python Tips đã đăng lại

If the format spec came first, it could easily be partialed: currency = partial(format, ',.2f')


R and Python Tips đã đăng lại

Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos The roadmap for modeling packages that adhere to tidyverse-tenets. Empirical validation and good methods, consistent interfaces, buff.ly/2FujRVE #rstudioconf #rstats

posit_pbc's tweet image. Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos  
The roadmap for modeling packages that adhere to tidyverse-tenets. 
Empirical validation and good methods, consistent interfaces, 
buff.ly/2FujRVE  #rstudioconf #rstats
posit_pbc's tweet image. Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos  
The roadmap for modeling packages that adhere to tidyverse-tenets. 
Empirical validation and good methods, consistent interfaces, 
buff.ly/2FujRVE  #rstudioconf #rstats
posit_pbc's tweet image. Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos  
The roadmap for modeling packages that adhere to tidyverse-tenets. 
Empirical validation and good methods, consistent interfaces, 
buff.ly/2FujRVE  #rstudioconf #rstats
posit_pbc's tweet image. Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos  
The roadmap for modeling packages that adhere to tidyverse-tenets. 
Empirical validation and good methods, consistent interfaces, 
buff.ly/2FujRVE  #rstudioconf #rstats

Loading...

Something went wrong.


Something went wrong.