formatting - Printing list in R -


suppose have list of lists in r.

>shelves1 <- list(row1.1="full box", row1.2="3 books", row1.3="2 lemons") >shelves2 <- list(row2.1="cartridges", row2.2="paper stacks") >all.shelves <- list(shelves1, shelves2) 

when tried printing list of lists

>all.shelves 

it shows information in format:

[[1]] [[1]]$row1.1 [1] "full box"  [[1]]$row1.2 [1] "3 books"  [[1]]$row1.3 [1] "2 lemons"   [[2]] [[2]]$row2.1 [1] "cartridges"  [[2]]$row2.2 [1] "paper stacks" 

i know easy question but, i'm getting started using r, question is: there way, instead of printing [[1]] , [[2]] on every change of list in list, show name of list instead? (without using sprintf() function)


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -