Re: [R] new question

2013-03-28 Thread arun
Hi, Try this: Spec - function(lista,FDR_k) {  list.new-lapply(lista,function(x) within(x,{spec- as.character(spec)}))  split.list-split(list.new,names(lista))  #Data needed with FDRFDR_k  seq.mod.z-lapply(seq_along(split.list),function(i) lapply(split.list[[i]],function(x)

Re: [R] new question

2013-03-28 Thread arun
veracosta...@gmail.com Cc: R help r-help@r-project.org Sent: Thursday, March 28, 2013 10:18 AM Subject: Re: [R] new question Hi, Try this: Spec - function(lista,FDR_k) {  list.new-lapply(lista,function(x) within(x,{spec- as.character(spec)}))  split.list-split(list.new,names(lista))  #Data

Re: [R] new question

2013-03-28 Thread arun
: Thursday, March 28, 2013 2:28 PM Subject: Re: [R] new question Hi, The function outputs the unique rows and also chisq test on frequency ( by row). Spec - function(lista,FDR_k) {  list.new-lapply(lista,function(x) within(x,{spec- as.character(spec)}))  split.list-split(list.new,names(lista

Re: [R] new question

2013-03-27 Thread arun
Hi, Regarding the first question: ListFacGroup-  lapply(ListFacGroup,unique)  Spec(ListFacGroup,0.05) #  #   Seq Mod z a2 c2 c3 t2 #1    aAATATAGPR  1-n_acPro/ 2  1  0  0  1 #2 aAAASSPVGVGQR 

Re: [R] new question

2013-03-26 Thread arun
Hi, Try this: (Used the old data folder) Compares the spec counts of sub directory with each other.  directory- /home/arunksa111/dados GetFileList - function(directory,number){  setwd(directory)  filelist1-dir()[file.info(dir())$isdir]     direct-dir(directory,pattern =

Re: [R] new question

2013-03-21 Thread arun
Sorry, I am not sure I understand your question.  You have 5 boxplots(if I remember correctly) on a single page and these 5 boxplots have titles a1,a2,c1,c2,t1 (or something like that). Could you try: par(mfcol(c(3,2)) and see if that helps. (not tested) A.K.

Re: [R] new question

2013-03-21 Thread arun
Hi, Try this: directory- /home/arunksa111/dados GetFileList - function(directory,number){  setwd(directory)  filelist1-dir()[file.info(dir())$isdir]     direct-dir(directory,pattern = paste(MSMS_,number,PepInfo.txt,sep=), full.names = FALSE, recursive = TRUE)  direct-lapply(direct,function(x)

Re: [R] new question

2013-03-19 Thread arun
I deleted the 't' subfolders from the dados folder. If you don't have 't' folders, wouldn't it be better to use: directory- /home/arunksa111/dados FacGroup-c(0,1,0,2,2,0,0) #instead of #FacGroup-c(0,1,0,2,2,0,3) FacGroup-c(0,1,0,2,2,0,3)  lista[FacGroup!=0] #[1]

Re: [R] new question

2013-03-18 Thread arun
 z.boxplot- function(lst){  new.list-  lapply(lst,function(x) x[x$FDR0.01,]) print(new.list)   par(mfrow=c(2,2)) b1-lapply(names(new.list),function(x) lapply(new.list[x],function(y) boxplot(FDR~z,data=y,xlab=Charge,ylab=FDR,main=x))) }  z.boxplot(ListFacGroup) #prints new.list If you want to

Re: [R] new question

2013-03-15 Thread arun
Hi, Try this: directory- /home/arunksa111/dados #modified the function GetFileList - function(directory,number){  setwd(directory)  filelist1-dir()     lista-dir(directory,pattern = paste(MSMS_,number,PepInfo.txt,sep=), full.names = TRUE, recursive = TRUE) output- list(filelist1,lista)  

Re: [R] new question

2013-03-07 Thread arun
Hi, directory- /home/arunksa111/dados #renamed directory to dados filelist-function(directory,number,list1){ setwd(directory) filelist1-dir(directory) direct-dir(directory,pattern = paste(MSMS_,number,PepInfo.txt,sep=), full.names = FALSE, recursive = TRUE) list1-lapply(direct, function(x)

Re: [R] new question

2013-02-28 Thread arun
Hi, directory- /home/arunksa111/data.new #first function filelist-function(directory,number,list1){ setwd(directory) filelist1-dir(directory) direct-dir(directory,pattern = paste(MSMS_,number,PepInfo.txt,sep=), full.names = FALSE, recursive = TRUE) list1-lapply(direct, function(x)

Re: [R] New question

2011-12-13 Thread Jorge I Velez
Hi, Are you sure? That's not what I got: require(epicalc) ?logistic.display model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert) logistic.display(model0) Logistic regression predicting case crude OR(95%CI) adj. OR(95%CI)P(Wald's test)

Re: [R] New question

2011-12-13 Thread Jorge I Velez
I forgot to mention (sorry for double posting) that str(infert) shows that induced and spontaneous are not factors: 'data.frame': 248 obs. of 8 variables: $ education : Factor w/ 3 levels 0-5yrs,6-11yrs,..: 1 1 1 1 2 2 2 2 2 2 ... $ age : num 26 42 39 34 35 36 23 32 21 28 ... $

Re: [R] New question

2011-12-13 Thread Jorge I Velez
Hi lm_mengxin, If that's the case, just use as.factor(): fit - glm(case ~ as.factor(induced) + as.factor(spontaneous), family=binomial, data=infert) logistic.display(fit) OR lower95ci upper95ci Pr(|Z|) as.factor(induced)1 1.585398 0.7972313 3.152769

[R] New question

2011-12-13 Thread 孟欣
According to the example of logistic.display: model0 - glm(case ~ induced + spontaneous, family=binomial, data=infert) summary(model0) logistic.display(model0) induced: 3levels 0,1,2 spontaneous: 3levels 0,1,2 So if 0 is reference, we should get 2 OR for induced1, induced2, spontaneous1,

Re: [R] New question

2011-12-13 Thread 孟欣
Yes,it works well. Thanks for your help. At 2011-12-14 13:06:14,Jorge I Velez jorgeivanve...@gmail.com wrote: Hi lm_mengxin, If that's the case, just use as.factor(): fit - glm(case ~ as.factor(induced) + as.factor(spontaneous), family=binomial, data=infert) logistic.display(fit)