To Spark a Reaction
Are Phase I resolutions a thing? If they weren’t, there are now. Because my Phase I resolution is to become more organized. Not only in terms my house or my business plans, but with my data. So when I saw my friend Thomas Mock post on LinkedIn about the package “Reactable,” I was inspired to check some features out.
Making Your Table
You know I’m a sucker for teaching with the built-in datasets R offers; my professors used them to teach my MBA class the basics and old habits die hard.
install.packages("reactable")
library(reactable)
reactable(iris)
It can’t get more simple than that. The table will show up in your viewer where you normally see your plots and it’ll look like this:
But that’s so not the end of the story. You can customize the appearance of your table in many ways.
For example, as shown below, you can add an option to filter by column right from your viewer, something that could be incredible useful:
reactable(iris, filterable = TRUE)
And what if you want to search for anything and everything within your dataframe turned table? This command has you covered:
reactable(iris, searchable = TRUE)
These are just three of the things this amazing package can do. If you want to play around more with conditional styling, grouping and even cell click actions, everything you’ll need is here.
As for now, I hope you enjoyed this tutorial and that “reactable” can make your data processing a little more efficient.
Like these tutorials?
Support the creation of more informative articles like this one when you become a patron of DiKayo Data on Patreon at www.patreon.com/datafemme.