Another option,
library(ggplot2)
qplot(year, value, data=melt(foo), color= L1)
which can also be achieved "by hand",
test<- do.call(rbind,foo) # combines all data.sets
test$name <- do.call(rep, list(x=names(foo), times =
unlist(lapply(foo,nrow # append the name of the original dataset
Create a zoo object z and plot it:
library(zoo)
f <- function(x) zoo(x$data, levels(x$year)[x$year])
z <- do.call(merge, lapply(foo, f))
plot(z, screen = 1, col = 1:6, pch = 1:6, type = "o",
ylab = "data", xlab = "year")
legend("topright", legend = 1:6, lty = 1, pch = 1:6, col = 1:6)
See
Hello R list,
I have a list of data frames, in the form (dump output for an example
list follows message):
$site1
yeardata
1 2000 0.03685042
2 2001 0.02583885
6 2005 0.02480015
7 2006 0.03458745
$site2
year data
1 2002 4.071134e-03
2 2003 -4.513524e-08
3 2004 8.336272e
3 matches
Mail list logo