ls=c("C","D","E","A","B"))
levels(dat1$d1)
#[1] "C" "D" "E" "A" "B"
mypath<-file.path("/home/arun/Trial1",paste("catalin_",LETTERS[c(3,4,5,1,2)],".jpg",sep=&quo
riginal Message -
From: catalin roibu
To: r-help@r-project.org
Cc:
Sent: Tuesday, January 8, 2013 4:22 AM
Subject: [R] plot residuals per factor
Dear R-users,
I want to plot residuals vs fitted for multiple groups with ggplot2.
I try this code, but unsuccessful.
library("plyr&quo
Dear R-users,
I want to plot residuals vs fitted for multiple groups with ggplot2.
I try this code, but unsuccessful.
library("plyr")
models<-dlply(dat1,"d",function(df)
mod<-lm(y~x,data=df)
ggplot(models,aes(.fitted,.resid), color=factor(d))+
geom_hline(yintercept=0,col="white",size=2)+
geo
3 matches
Mail list logo