waru
waru

Reputation: 13

Using dollar sign for looping through multiple data frames

I have one big data frame df. I used split() to devide it into smaller data frames. thes can be viewed by: view(a$1) , view(a$2),...

I wondered if i could use a loop for this to view all the smaller data frames:

for (i in 1:2) {
  b <- paste0("a$", `i`)
  print(b)
  View(b)
  i= i+1
}

However the paste0 function returns as$1, to acces the dataframe I need as$'1'. Anyone any idea how to do this? Tried searching for it but found nothing.

Upvotes: 0

Views: 18

Answers (0)

Related Questions