[R] R jags clear deviance

2012-11-26 Thread Guillaume2883
Hi all, I'd like to fit different models using a loop together with the jags package. to do this, I load the following packages "runjags", "R2jags" and "coda" and use the function "jags" to fit my models. The problem is that the following a windowx with the following message appear between eac

Re: [R] newbie: embeding seq in a list

2012-10-30 Thread Guillaume2883
Hello Just add "c()" collector as follows : env <- list(c(0.8,0.9,1.0,1.1,1.2)) Cheers Guillaume -- View this message in context: http://r.789695.n4.nabble.com/Re-newbie-embeding-seq-in-a-list-tp4647884p4647896.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] barplot with some 0 frequencies

2012-10-05 Thread Guillaume2883
Thank for all your answer ! Here is another way I discoverd this morning : barplot(table(factor(variable, levels = 1:4)),names=c(1,2,3,4)) -- View this message in context: http://r.789695.n4.nabble.com/barplot-with-some-0-frequencies-tp4645102p4645208.html Sent from the R help mailing list arc

Re: [R] Bayesian inference distribution parameters

2012-10-05 Thread Guillaume2883
Maybe this link could help you http://sirs.agrocampus-ouest.fr/bayes_V2/index_menu.html You will be able to download some code ! -- View this message in context: http://r.789695.n4.nabble.com/Bayesian-inference-distribution-parameters-tp4645155p4645207.html Sent from the R help mailing list ar

[R] barplot with some 0 frequencies

2012-10-04 Thread Guillaume2883
Hi all, I am back with a new question ! I recorded the occurence of 4 differents event on 20 places for a given time period. Now, I want to do some barplot of the frequency of theses events for each place, so it should be easy. My problem is that I want to see the frequencies of the 4 events on my

[R] vectorization condition counting

2012-08-10 Thread Guillaume2883
Hi all, I am working on a really big dataset and I would like to vectorize a condition in a if loop to improve speed. the original loop with the condition is currently writen as follow: if(sum(as.integer(tags$tag_id==tags$tag_id[i]))==1&tags$lgth[i]<300){ tags$stage[i]<-"J" }

[R] load coda in BRugs to perfor diagnostics

2012-06-05 Thread Guillaume2883
Dear all, I just wrote a script to have each of my three mcmc chins running on a different computer core to improve computation speed. To do it I use the function sfLapply from the package snowfall. Before using parallell computation, I did my diagnostic analyses just after the model updating, but