LAPelly
LAPelly

Reputation: 1

In R, is there any way to automatically run an output after it has been printed?

Sorry if this sounds a bit messy, I'm new to using R. I have a data frame named "AB13" ( a postcode) and I am using a list of all postcodes which I imported as a .csv file. Is there any way I can print one of the columns and run it through the console automatically. Say print the 10th element of the list, which is AB13. Then it will display AB13 ( the data frame)?

I have tried using print, cat and multiple other print functions but I haven't been able to get anywhere.

Upvotes: 0

Views: 48

Answers (1)

fmarm
fmarm

Reputation: 4284

You can do

 get(your_list[[10]])

Upvotes: 2

Related Questions