[R] zero-inflated negative binomial model with random effects

2014-01-04 Thread Santiago Guallar
Hi, I'd like to incorporate a random intercept in a zero-inflated negative binomial model. Package pscl is great but does not allow random effects, and package MCMCglmm doesn't support the negative binomial. I'm aware that package glmmADMB supported both random effects and the negative binomial

Re: [R] speed up a function

2013-07-15 Thread Santiago Guallar
Dear Petr, Sorry for the delay. I've been out. Unfortunately, your code doesn't work either even when using fromLast = T. Thank you for your help and your time. Santi From: PIKAL Petr petr.pi...@precheza.cz To: Santiago Guallar sgual...@yahoo.com Cc: r-help

Re: [R] spped up a function

2013-07-09 Thread Santiago Guallar
From: PIKAL Petr petr.pi...@precheza.cz To: Santiago Guallar sgual...@yahoo.com; r-help r-help@r-project.org Sent: Monday, July 8, 2013 11:34 AM Subject: RE: [R] spped up a function Hi It seems to me, that you basically want merge, but I can miss the point. Try post dput

[R] spped up a function

2013-07-02 Thread Santiago Guallar
Hi, I have written a function to assign the values of a certain variable 'wd' from a dataset to another dataset. Both contain data from the same time period but differ in the length of their time intervals: 'GPS' has regular 10-minute intervals whereas 'xact' has irregular intervals. I

[R] modify and append new rows to a data.frame using ddply

2013-06-10 Thread Santiago Guallar
Hi, I have a data.frame that contains a variable act which records the duration (in seconds) of two states (wet-dry) for several individuals (identified by Ring) over a period of time. Since I want to work with daytime (i.e. from sunrise till sunset) and night time (i.e. from sunset till next

[R] modify and append new rows in a dataframe

2013-06-08 Thread Santiago Guallar
My data frame shows changes on the variable act which records the consecutive duration (in seconds) of two states (wet-dry) over a few days for several  individuals (identified by Ring). Since I want to work with daytime (i.e. from dawn till dusk) and night time (i.e. from dusk till next dawn),

Re: [R] Cramer von Mises test for a discrete distribution

2013-02-20 Thread Santiago Guallar
Rowlingson b.rowling...@lancaster.ac.uk To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Tuesday, February 19, 2013 6:20 PM Subject: Re: [R] Cramer von Mises test for a discrete distribution On Tue, Feb 19, 2013 at 2:49 PM, Santiago Guallar sgual

Re: [R] Cramer von Mises test for a discrete distribution

2013-02-20 Thread Santiago Guallar
Great Barry! Thanks for your time. I will e-mail the package maintainers.   Santi From: Barry Rowlingson b.rowling...@lancaster.ac.uk To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Wednesday, February 20, 2013 1:36 PM Subject: Re: [R] Cramer von

[R] Cramer von Mises test for a discrete distribution

2013-02-19 Thread Santiago Guallar
Hi,   I'm trying to carry out Cramer von Mises tests between pairs of vectors belonging to a discrete distribution (concretely frequencies from 0 to 200). However, the program crashes in the attempt. The problem seems to be that these vectors only have positive integer numbers (+ zero). When I

[R] inserting jpg

2012-12-07 Thread Santiago Guallar
I’m trying to insert 8 jpg files with the main moon phases in a plot using read.image. My code:   ## Images   library(ReadImages) c1 = read.jpeg( '1c.jpg' ) c2 = read.jpeg( '2c.jpg' ) c3 = read.jpeg( '3c.jpg' ) d1 = read.jpeg( '1d.jpg' ) d2 = read.jpeg( '2d.jpg' ) d3 = read.jpeg( '3d.jpg' ) f

Re: [R] Imposing more than one condition to if

2012-07-19 Thread Santiago Guallar
Great! Thank you ever so much Rui. Santi From: Rui Barradas ruipbarra...@sapo.pt To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org Sent: Wednesday, July 18, 2012 8:29 PM Subject: Re: [R] Imposing more than one condition to if Hello, You're

Re: [R] Imposing more than one condition to if

2012-07-18 Thread Santiago Guallar
)}     Santi From: Rui Barradas ruipbarra...@sapo.pt To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org Sent: Wednesday, July 18, 2012 11:37 AM Subject: Re: [R] Imposing more than one condition to if hELLO, There was no nedd to change the names of the variables inside the fucntion

Re: [R] Imposing more than one condition to if

2012-07-17 Thread Santiago Guallar
dataset.   Santi From: Rui Barradas ruipbarra...@sapo.pt To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org Sent: Tuesday, July 17, 2012 11:52 AM Subject: Re: [R] Imposing more than one condition to if Hello, My code couldn't find the right input columns because your real data has

Re: [R] Imposing more than one condition to if

2012-07-17 Thread Santiago Guallar
, by(z, z$date, f))   Again, I attached a dput() with the object z which contains my dataset.   Santi From: Rui Barradas ruipbarra...@sapo.pt To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org Sent: Tuesday, July 17, 2012 11:52 AM Subject: Re: [R] Imposing more than one condition

[R] Imposing more than one condition to if

2012-07-15 Thread Santiago Guallar
Hi,   I have a dataset which contains several time records for a number of days, plus a variable (light) that allows to determine night time (lihgt= 0) and daytime (light 0). I need to obtain get dusk time and dawn time for each day and place them in two columns. This is the starting point 

Re: [R] creating a new column assigning values of other columns

2012-05-06 Thread Santiago Guallar
() instead of if. To compare: x - seq(-3, 3) abs.x.wrong - if(x 0) -x else x # Warning message gives some hint abs.x.right - ifelse(x 0, -x, x) Hope this helps, Michael On Sat, May 5, 2012 at 5:09 PM, Santiago Guallar sgual...@yahoo.com wrote: Hello, I have to create a new column from

Re: [R] creating a new column assigning values of other columns

2012-05-06 Thread Santiago Guallar
but adds 1 hour (!!!) niga$isnight=niga$night - as.difftime ( 1, units= hours ) # subtraction of 1 hour Thank you very much for your time!   Santi From: R. Michael Weylandt michael.weyla...@gmail.com To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent

Re: [R] Subtract days to dates in POSIXct format

2012-05-01 Thread Santiago Guallar
, clock))) B=cbind(A,colsplit(A$date, split = /, names = c(d, m, y))) C-subset(B,B$m==1) # January data; the bird was in South Atlantic waters write.table(C) Thank you very much for your help, Santi From: Jeff Newmiller jdnew...@dcn.davis.ca.us To: Santiago Guallar

Re: [R] Subtract days to dates in POSIXct format

2012-04-30 Thread Santiago Guallar
...@dcn.davis.ca.us To: Santiago Guallar sgual...@yahoo.com Cc: r-help@r-project.org r-help@r-project.org Sent: Monday, April 30, 2012 5:51 PM Subject: Re: [R] Subtract days to dates in POSIXct format On Mon, 30 Apr 2012, Santiago Guallar wrote: Hello, I'm having problems working with date values

[R] Importing files

2012-03-18 Thread Santiago Guallar
Hello, I'm trying to import into R files that contain data downloaded from logger devices as files with the following formats: .act .lig .trj .trn These files are essentially text files but use both tabs and commas as separators. I've tried the function scan: 1) scan(filename.act,

[R] Automated generation of combinations

2011-09-12 Thread Santiago Guallar
Hello,   I'd like to generate automatically all the possible combinations of a set of 8 variables (there are 535, too many to do it by hand). For example:   input: varA, varB, varC output: varA+varB+varC varA+varB varA+varC varB+varC varA