[R] plotting from dataframes

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Fri Jan 18 17:03:42 CET 2013

You need to (re-) read the Introduction to R document that comes with R, particularly about indexing lists.

Briefly, there are three ways: integer, string, and approximate string indexing. You seem to be stuck now using approximate string indexing with the $ operator. Integer indexing is more appropriate for your loop.

for(i in 1:10){
plot( frames[[ i ]]$hour1 )

Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

condor <radonnikodym at hotmail.nl> wrote:

>So by hand the command would be 
>But in my case there are far more than 2 days, so I want to use a loop.
>Suppose I have 10 plots
>for(i in 1:10){
>plot( /what should be put here??/)
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list