R function a day keeps the madness away π§ββοΈ β If youβre a new follower, check out older posts as well π β From 24.01.2021 to 24.01.2022 β by @patilindrajeets
As requested by some of you, there is now a book of these posts! π
https://t.co/ziDsn8dFCR
Makes it easy to-
π read
π search
π share
etc.
It ain't pretty, but that's the best I'd do in a day π
PRs welcome if you notice that something is amiss π
#rstats#DataScience
Today concludes this 1-year hobby project.
There wonβt be new posts, so feel free to unfollow, but do keep revisiting! π
With > 22K followers in 365 posts, I guess you enjoyed reading them as I much as Iβd preparing them. π
Best luck with your jouRneys! π€
@patilindrajeets
If you want to get a quick overview of descriptive statistics for a numeric variable, {describe_distribution} from {parameters} π¦ is your friend π
https://t.co/KlhJNsdL90
Also works with a {grouped_} dataframe from {dplyr} π
#rstats#DataScience
Factor analysis (FA) can help reduce many features to a few latent features. But one first needs to check if data is suitable for FA.
The {check_factorstructure} function from {parameters} provides an informative and verbose way π
https://t.co/MNQZMkum30
#rstats#DataScience
Today concludes this 1-year hobby project.
There wonβt be new posts, so feel free to unfollow, but do keep revisiting! π
With > 22K followers in 365 posts, I guess you enjoyed reading them as I much as Iβd preparing them. π
Best luck with your jouRneys! π€
@patilindrajeets
@malte_grosser @patilindrajeets Good idea!
Might work on that soon, but until then this timeline widget should come in handy π§΅
https://t.co/rMckH9wIXP
If we need to bind multiple dataframes by rows, we may first wish to check if this can be done successfully.
The {compare_df_cols} function from {janitor} π¦ provides a summary of data types to check this! ππ
https://t.co/88zYQFdIWa
#rstats#DataScience
@JonGretar @kiwiSteveTaylor @rstats4ds In real use cases, this routine will actually be used to access a variable - specified by the user - from a data frame.
Note that now `data$x` wonβt work because we donβt know a priori what `x` is going to be.
While working in a piped workflow, if you need to extract a single column, the syntax to do so can be a bit cumbersome.
The {pull} function from {dplyr} π¦ provides a more readable syntax to this end! π
https://t.co/rCT1vcMZzX
#rstats#DataScience
@ThomVolker Yes, I have shared it in the past π
But, AFAIK, that operator is used for side effects. So you will be able to print that column but wonβt be able to assign it to an object. I think.
Although a number of functions tend to have a {data} argument, some donβt. For such functions, the pipe operator (%>%) from {magrittr} π¦ wonβt work.
In such contexts, one can use the exposition pipe operator (%$%) π
https://t.co/1RODRqilaL
#rstats#DataScience
Visualizing data along an Archimedean spiral can efficiently reveal periodic patterns in time series data.
The {spiral_*} function family from {spiralize} π¦ draws such spiral plots flexibly! π
https://t.co/5vybsvWv2e
#rstats#DataScience
Serialization changes objects to a byte stream that can be saved to a binary file, while deserializing does the reverse.
The {q*} function family from {qs} π¦ provides a performant way to serialize or deserialize any R object! β‘οΈ
https://t.co/i8BNgtAQWw
#rstats#DataScience
Sometimes you may wish to include some patterns or images in plots for enhanced storytelling.
The {image*} or {pattern*} function family from {patternplot} π¦ provides a way to do so! βοΈ
https://t.co/lRhdnmbQoQ
#rstats#DataScience
@Fischuu None at all. In fact, AFAIK, the implementation of this data type in {reticulate} is based on names lists.
Dictionary just provides a familiar name for bilingual users to a data structure that is not native to R but can be easily implemented.
Python dictionary is an unordered data type with key-value pairs that allows accessing values, not by indexing, but via unique keys.
The {py_dict} function from {reticulate} π¦ gives you access to this data type in R! π
https://t.co/stxGhcedjI
#rstats#DataScience
Sometimes, especially in the context of statistical modeling, there might be infinite or NaN's present in outputs that we may wish to replace with NAs.
The {zap_inf} helper function from {sjmisc} π¦ does exactly this! βΎ
https://t.co/mrWehQheOi
#rstats#DataScience