Re: [R] Date classes in ggplot2

2008-10-20 Thread Thompson, David (MNR)
Is not melt part of reshape package, i.e., require(reshape)? 

DaveT.
-Original Message-
From: stephen sefick [mailto:[EMAIL PROTECTED] 
Sent: October 19, 2008 12:12 PM
To: hadley wickham
Cc: R Help
Subject: Re: [R] Date classes in ggplot2

well I must have either resolve it without knowing it, ot something
funny is going on...  sorry I didn't run it in a clean R session.
Should have.  works fine
thanks

Stephen Sefick

On Sun, Oct 19, 2008 at 12:01 PM, hadley wickham 
[EMAIL PROTECTED] wrote:
 On Sun, Oct 19, 2008 at 10:49 AM, stephen sefick 
[EMAIL PROTECTED] wrote:
 updn.gg - (structure(list(date = structure(c(11808, 11869, 
11961, 11992,
 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057,
 13149), class = Date), unrestored = c(1.13789418691602, 
0.704948049842955,
 0.276777348238899, 0.417586861554189, 0.504870337754768, 
0.673201771716216,
 0.560704221510771, 0.835737007551542, 1.10773858390693, 
0.197070828834836,
 0.942350681588179, 0.950447141061461, 0.246637790002705, 
0.324035567509960
 ), restored = c(1.39981554315924, 0.89196314359498, 
0.407816250252697,
 0.823496839063978, 1.14429021220358, 1.23971035967413, 
0.960868900583432,
 0.927685306209829, 1.22072345292821, 0.249842897450642, 
1.00879641624694,
 0.925372139878243, 0.317259909172362, 0.382677149697482)), 
.Names = c(date,
 unrestored, restored), row.names = c(NA, -14L), class = 
data.frame))

 #I would like to do this in ggplot
 xyplot(unrestored+restored~date, data=updn.gg, type=c(l), 
auto.key=TRUE)
 #this is what I have tried and get an error message
 melt.updn - melt(updn.gg, id.var=date)

 What error message?  It works for me.

 Hadley

 --
 http://had.co.nz/




-- 
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

   
-K. Mullis




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Date classes in ggplot2

2008-10-20 Thread stephen sefick
yes it is,  I meant without the clutter of my previous analyses -
reshape is required by ggplot2 so I had that covered... If I am
understanding you correctly.
thanks for all of the help,

Stephen

On Mon, Oct 20, 2008 at 9:39 AM, Thompson, David (MNR)
[EMAIL PROTECTED] wrote:
 Is not melt part of reshape package, i.e., require(reshape)?

 DaveT.
-Original Message-
From: stephen sefick [mailto:[EMAIL PROTECTED]
Sent: October 19, 2008 12:12 PM
To: hadley wickham
Cc: R Help
Subject: Re: [R] Date classes in ggplot2

well I must have either resolve it without knowing it, ot something
funny is going on...  sorry I didn't run it in a clean R session.
Should have.  works fine
thanks

Stephen Sefick

On Sun, Oct 19, 2008 at 12:01 PM, hadley wickham
[EMAIL PROTECTED] wrote:
 On Sun, Oct 19, 2008 at 10:49 AM, stephen sefick
[EMAIL PROTECTED] wrote:
 updn.gg - (structure(list(date = structure(c(11808, 11869,
11961, 11992,
 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057,
 13149), class = Date), unrestored = c(1.13789418691602,
0.704948049842955,
 0.276777348238899, 0.417586861554189, 0.504870337754768,
0.673201771716216,
 0.560704221510771, 0.835737007551542, 1.10773858390693,
0.197070828834836,
 0.942350681588179, 0.950447141061461, 0.246637790002705,
0.324035567509960
 ), restored = c(1.39981554315924, 0.89196314359498,
0.407816250252697,
 0.823496839063978, 1.14429021220358, 1.23971035967413,
0.960868900583432,
 0.927685306209829, 1.22072345292821, 0.249842897450642,
1.00879641624694,
 0.925372139878243, 0.317259909172362, 0.382677149697482)),
.Names = c(date,
 unrestored, restored), row.names = c(NA, -14L), class =
data.frame))

 #I would like to do this in ggplot
 xyplot(unrestored+restored~date, data=updn.gg, type=c(l),
auto.key=TRUE)
 #this is what I have tried and get an error message
 melt.updn - melt(updn.gg, id.var=date)

 What error message?  It works for me.

 Hadley

 --
 http://had.co.nz/




--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.


-K. Mullis







-- 
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

-K. Mullis

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Date classes in ggplot2

2008-10-19 Thread hadley wickham
On Sun, Oct 19, 2008 at 10:49 AM, stephen sefick [EMAIL PROTECTED] wrote:
 updn.gg - (structure(list(date = structure(c(11808, 11869, 11961, 11992,
 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057,
 13149), class = Date), unrestored = c(1.13789418691602, 0.704948049842955,
 0.276777348238899, 0.417586861554189, 0.504870337754768, 0.673201771716216,
 0.560704221510771, 0.835737007551542, 1.10773858390693, 0.197070828834836,
 0.942350681588179, 0.950447141061461, 0.246637790002705, 0.324035567509960
 ), restored = c(1.39981554315924, 0.89196314359498, 0.407816250252697,
 0.823496839063978, 1.14429021220358, 1.23971035967413, 0.960868900583432,
 0.927685306209829, 1.22072345292821, 0.249842897450642, 1.00879641624694,
 0.925372139878243, 0.317259909172362, 0.382677149697482)), .Names = c(date,
 unrestored, restored), row.names = c(NA, -14L), class = data.frame))

 #I would like to do this in ggplot
 xyplot(unrestored+restored~date, data=updn.gg, type=c(l), auto.key=TRUE)
 #this is what I have tried and get an error message
 melt.updn - melt(updn.gg, id.var=date)

What error message?  It works for me.

Hadley

-- 
http://had.co.nz/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Date classes in ggplot2

2008-10-19 Thread stephen sefick
well I must have either resolve it without knowing it, ot something
funny is going on...  sorry I didn't run it in a clean R session.
Should have.  works fine
thanks

Stephen Sefick

On Sun, Oct 19, 2008 at 12:01 PM, hadley wickham [EMAIL PROTECTED] wrote:
 On Sun, Oct 19, 2008 at 10:49 AM, stephen sefick [EMAIL PROTECTED] wrote:
 updn.gg - (structure(list(date = structure(c(11808, 11869, 11961, 11992,
 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057,
 13149), class = Date), unrestored = c(1.13789418691602, 0.704948049842955,
 0.276777348238899, 0.417586861554189, 0.504870337754768, 0.673201771716216,
 0.560704221510771, 0.835737007551542, 1.10773858390693, 0.197070828834836,
 0.942350681588179, 0.950447141061461, 0.246637790002705, 0.324035567509960
 ), restored = c(1.39981554315924, 0.89196314359498, 0.407816250252697,
 0.823496839063978, 1.14429021220358, 1.23971035967413, 0.960868900583432,
 0.927685306209829, 1.22072345292821, 0.249842897450642, 1.00879641624694,
 0.925372139878243, 0.317259909172362, 0.382677149697482)), .Names = c(date,
 unrestored, restored), row.names = c(NA, -14L), class = data.frame))

 #I would like to do this in ggplot
 xyplot(unrestored+restored~date, data=updn.gg, type=c(l), auto.key=TRUE)
 #this is what I have tried and get an error message
 melt.updn - melt(updn.gg, id.var=date)

 What error message?  It works for me.

 Hadley

 --
 http://had.co.nz/




-- 
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

-K. Mullis

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.