0

I have a data frame like this:

dataframe screenshot

and I wanted to create a loop that filters when for example period = 1 and plots a graph with all the values of x and y in which period = 1. How could I do this?

FraggaMuffin
  • 3,915
  • 3
  • 22
  • 26
F M
  • 1
  • 1
  • Please create a reproducible example: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Sinval May 03 '21 at 09:52

1 Answers1

0

We can subset the data where 'Time' is 1, and plot the 'x' and 'y' column

with(subset(df1, Time ==1), plot(XPoblacion_Update3, YPoblacion_Update3))
akrun
  • 874,273
  • 37
  • 540
  • 662