So by hand the command would be
par(mfrow=c(1,2))
plot(frames$'1'hour1)
plot(frames$'2'hour1)
But in my case there are far more than 2 days, so I want to use a loop.
Suppose I have 10 plots
par(mfrow=c(2,5))
for(i in 1:10){
plot( /what should be put here??/)
}
--
View this message in
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of condor
Sent: Friday, January 18, 2013 10:17 AM
To: r-help@r-project.org
Subject: Re: [R] plotting from dataframes
So by hand the command would be
par(mfrow=c(1,2
Hello,
Maybe instead of a loop, you could try
lapply(frames, function(y) plot(y$hour1))
Hope this helps,
Rui Barradas
Em 18-01-2013 09:16, condor escreveu:
So by hand the command would be
par(mfrow=c(1,2))
plot(frames$'1'hour1)
plot(frames$'2'hour1)
But in my case there are far more than
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
.
- Original Message -
From: condor radonniko...@hotmail.nl
To: r-help@r-project.org
Cc:
Sent: Friday, January 18, 2013 4:16 AM
Subject: Re: [R] plotting from dataframes
So by hand the command would be
par(mfrow=c(1,2))
plot(frames$'1'hour1)
plot(frames$'2'hour1)
But in my case there are far more than
thanks to your guys help I am closer to solving my problem but I have some
small problem. So let's say I start with
data
number day hour
1 17 10
2 17 11
3 17 6
4 18 4
5 18 10
6 19 8
7 19 8
I want to
It's not really clear to me what you mean when you say that you want to
plot the hours, so it's hard to help. Regardless, take a look at looping
and plotting in any of the free documentation on CRAN.
http://cran.r-project.org/other-docs.html
I hope that this helps,
Andrew
On Fri, Jan 18,
7 matches
Mail list logo