> >> It sounds like something is going wrong with the melting. Could you
> >> please include the output of str(original data frame), and
> >> str(melted)? (Or even better a small version of your data created
> >> with dput)
> >
>
> > And this is a str output of the original data frame (first few rows of that
> > displayed in the console):
> >
> > `data.frame': 6 obs. of 720 variables:
> > $ -179.75: num -99.9 -99.9 -99.9 -99.9 -99.9 -99.9
> > $ -179.25: num -99.9 -99.9 -99.9 -99.9 -99.9 -99.9
> > $ -178.75: num -99.9 -99.9 -99.9 -99.9 -99.9 -99.9
> > $ -178.25: num -99.9 -99.9 -99.9 -99.9 -99.9 -99.9
> > $ -177.75: num -99.9 -99.9 -99.9 -99.9 -99.9 -99.9
> >
>
> Oooh, sorry, I thought your original was a matrix. So you should do:
>
> melted <- melt(as.matrix(yourdataframe))
I've just tried this and unfortunately it only produces a list of the latitude
(column name) values from -89.75 to 89.75, without any of the other data:
> dim(melted)
[1] 360 0
> str(melted)
num[1:360, 0 ]
- attr(*, "dimnames")=List of 2
..$ : chr [1:360] "-89.75" "-89.25" "-88.75" "-88.25" ...
..$ : NULL
Is there a way of retrieving the other data?
_________________________________________________________________
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.