Zooming and filtering
Sometimes, we need to zoom in to see the special pattern in the dataset. In this recipe, we will see how we can zoom in to the plot with the use of a simple argument in the existing function.
Getting ready
Let's recall the same data with continuous variables only (con_dat
). We want to create the plot with 20 to 50 percent of the data based on sorted variables.
How to do it...
The code to produce the plot by zooming into the mpg
variable with 20 to 50 percent of the observation is as follows:
tableplot(con_dat,from=20,to=50,sortCol=mpg)
How it works…
The from
and to
arguments specify which part of the data needs to be used during plotting. ...
Get R: Data Analysis and Visualization now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.