plot() on Data Frame

Q

How to use the plot() function on a data frame?

✍: FYIcenter.com

A

If you have a data frame with 2 columns, you can pass the data frame as the first argument to the plot() function to visualize the data.

Call plot() with the example data frame, "cars":

> dim(cars)
[1] 50  2

> plot(cars)

The following graphic will be generated:

plot() Function on Data Frame
plot() Function on Data Frame

 

plot() on Function

What Is plot() Function

Built-in Graphics Package in R Environment

⇑⇑ R Software Environment - Frequently Asked Questions

2023-03-17, 301🔥, 0💬