[R] reshape bug?

From: stephen sefick <ssefick_at_gmail.com>
Date: Fri, 31 Oct 2008 14:51:15 -0400


Hadley et al.,
I was using the cast function to reshape some data (aggregate a melted data frame) and I did not put in the fill and for the most part the values that came out were fine, but there were value great than an order of magnitude from the actual value. When I put in the fill argument everything is okay. I don't provide a reproducible example because the data set is to large to post to the list, but if you would like to see it then I can provide it.

#this works

cast(x, Date+RiverMile+location~Order, sum, fill=0)

#this doesn't

cast(x, Date+RiverMile+location~Order, sum)

R version 2.8.0 (2008-10-20)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] splines grid stats graphics grDevices utils datasets methods base

other attached packages:

[1] ggplot2_0.7        MASS_7.2-44        RColorBrewer_1.0-2
proto_0.3-8        reshape_0.8.1      plyr_0.1.1


thanks

-- 
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_at_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.
Received on Fri 31 Oct 2008 - 18:54:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Nov 2008 - 15:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive