From the course: R: Interactive Visualizations with htmlwidgets
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Use the pipe operator (%>%) - R Tutorial
From the course: R: Interactive Visualizations with htmlwidgets
Use the pipe operator (%>%)
- [Instructor] All of the most widely used htmlwidget packages depend on the pipe operator. This thing, percentage, greater than, percentage or if you prefer, percentage, right angle bracket, percentage. It's really important that you're comfortable in using the pipe operator in order to start with htmlwidgets. Let's demonstrate how the pipe operator works with one of my favorite libraries, leaflet. I'll make sure you're comfortable in understanding how these two cojuncts are completely equivalent to one another. To do that, let's go to my exercise files. Inside of here is a file called leaflet dot R. Let's open that up. Let's decrease the size my environment because I don't need it for this exercise. I also don't need my file explorer so I'll double click on console to maximize that. Now, at the top of the script file, I have library leaflet. I don't currently have the leaflet library installed so let's install that in our console by typing install dot packages. Open a quotation and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.