search for: exampledf

Displaying 2 results from an estimated 2 matches for "exampledf".

Did you mean: exampled
2012 Jan 10
1
Converting BY to a data.frame
Hello, I am trying to convert BY to a data frame, consider the following example: exampleDF<-data.frame(a=c(1,2),b=c(10,20),name=c("first","second")) exampleBY<-by(exampleDF,with(exampleDF,paste(a,b,sep="_")),               function(x) {                 data.frame(                     name=as.character(x$name),                     a=x$a,               ...
2006 Sep 20
1
Pooled Covariance Matrix
I am in a discriminant analysis situation with a frame containing several variables and a grouping factor, if you like: set.seed(200906) exampledf <- as.data.frame(matrix(rnorm(50,5,2),nrow=10,ncol=5)) exampledf$Group <- factor(rep(c(1,2,3),c(3,3,4))) exampledf I'm sure there must be a simple way to get the within group pooled covariance matrix but I haven't found it yet. I started thinking that one might begin by forming a f...