[R] Help with Table headers

2008-12-10 Thread Haroon Malik
Hi, I have a little problem with table header. I am enclosing my TOY example: I have a tab separated file(tsv) with two columns as follow: \\disk(c:) \\processor(1) 322 40 422 60 I read the file using read.table as follow: tab<-read.table("c:/R/file1.

[R] Help with Table headers

2008-12-10 Thread Haroon Malik
Hi, I have a little problem with table header. I am enclosing my TOY example: I have a tab separated file(tsv) with two columns as follow: \\disk(c:) \\processor(1) 322 40 422 60 I read the file using read.table as follow: tab<-read.table("c:/R/file1.

Re: [R] help with table

2008-05-22 Thread jim holtman
Is this what you want: > x <- by(frame, list(frame$p.a, frame$p.b), function(.row){ + c(f=sum(.row$r)/ nrow(.row), p.a=.row$p.a[1], p.b=.row$p.b[1],freq=nrow(.row)) + }) > do.call(rbind, x) f p.a p.b freq [1,] 0.50 10 22 [2,] 0.50 20 32 [3,] 0.25 50 54 On Thu, M

[R] help with table

2008-05-22 Thread Hugh Kingston
Dear All, I would be most grateful for help on this problem. I have a binary response variable. It is classified by various factors. I would like to have a table with; column 1 frequency response is 1 / (frequency the response is 1 + frequency the response is 0) #given the classifying factors