Displaying 1 result from an estimated 1 matches for "flat_data".
Did you mean:
float_data
2011 Sep 13
3
ggplot - class "character" problem
...sts\\Stressed ESG inputs")
input<-read.csv("yieldcurve plus 1pct abs.csv",header=FALSE)
#label columns
colnames(input)<-c("scenID","yrs_ahead",0.5,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0)
#create a data frame that i hope! will work with ggplot..
flat_data<-data.frame(cbind(input[1:2],stack(input[3:15])))
colnames(flat_data)<-c("scenID","yrs_ahead","yield","time")
#plot
library(ggplot2)
qplot(time,yield,data="flat_data",facets = yrs_ahead~.)
now the error.
In terms of the data format, head(fl...