Re: [R] pairwise deletion in regression models

2016-07-12 Thread PIKAL Petr
Hi http://stats.stackexchange.com/questions/158366/fit-multiple-regression-model-with-pairwise-deletion-or-on-a-correlation-covari The package is probably not available on CRAN but seems to be still maintained on github. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-bo

Re: [R] Aggregate rainfall data

2016-07-12 Thread David Winsemius
> On Jul 12, 2016, at 3:45 PM, roslinazairimah zakaria > wrote: > > Dear R-users, > > I have these data: > > head(balok, 10); tail(balok, 10) >Date Time Rain.mm > 1 30/7/2008 9:00:00 0 > 2 30/7/2008 10:00:00 0 > 3 30/7/2008 11:00:00 0 > 4 30/7/2008 12:00:00

[R] Aggregate rainfall data

2016-07-12 Thread roslinazairimah zakaria
Dear R-users, I have these data: head(balok, 10); tail(balok, 10) Date Time Rain.mm 1 30/7/2008 9:00:00 0 2 30/7/2008 10:00:00 0 3 30/7/2008 11:00:00 0 4 30/7/2008 12:00:00 0 5 30/7/2008 13:00:00 0 6 30/7/2008 14:00:00 0 7 30/7/2008 15:00:00

Re: [R] Linear model vs Mixed model

2016-07-12 Thread Cade, Brian
Your lm() estimates are using the default contrasts of contr.treatment, providing an intercept corresponding to your subject 308 and the other subject* estimates are differences from subject 308 intercept. You could have specified this with contrasts as contr.sum and the estimates would be more ea

[R] pairwise deletion in regression models

2016-07-12 Thread adel daoud
Dear R users, I would like to use a pairwise deletion of missing values in linear regression (lm or glm preferably). I want to replicate some studies done in STATA that uses this type of deletion. What options do we have in R to work with pairwise deletion? Most packages I have found do not have

Re: [R] Linear model vs Mixed model

2016-07-12 Thread Utkarsh Singhal
Hello Thierry, Thank you for your quick response. Sorry, but I am not sure if I follow what you said. I get the following outputs from the two models: > coef(lmer(Reaction ~ Days + (1| Subject), sleepstudy)) Subject(Intercept) Days 308292.1888 10.46729 309173.5556 10.46729 3101

Re: [R] use value in variable to be name of another variable

2016-07-12 Thread Aedin Culhane
Hi Matt It looks like you are trying to obtain the upstream sequence data information given transcription factor binding sites??? There are a lot of functions in Bioconductor which are optimized for this type of analysis. If you wish to either post on the Bioconductor mailing list (https://s

Re: [R] Error:'subscript out of bounds'

2016-07-12 Thread William Dunlap via R-help
Include the levels argument in your calls to factor so the tables all have the same dimensions. > table(factor((1:4)>2), factor( (1:4)>0 )) TRUE FALSE2 TRUE 2 > table(factor((1:4)>2, levels=c(FALSE,TRUE)), factor( (1:4)>0, levels=c(FALSE,TRUE) )) FALSE TRUE FALSE

Re: [R] Error:'subscript out of bounds'

2016-07-12 Thread Sarah Goslee
You don't provide a reproducible example - what does your data look like? If this were my problem, I would start by working through the function step by step with one of my files data <- filelist[[1]] dataodd <- data[-(1:18),] and so on, examining the result at every step with tools like dim() a

[R] Forking and adapting an R package

2016-07-12 Thread timo
Hello. I'm trying to adapt the package “hexbin” to suit my needs. This is the first time I do this. I've read a bit through Hadley's “R packages”, but now I'm pretty lost (from a workflow point of view). I am using RStudio and Hadley's devtools. So I forked the repo I want to adapt: https://git

[R] Error:'subscript out of bounds'

2016-07-12 Thread Samsad Afrin Himi
Dear R-team, I have written this code for calculation my data file. But there shows 'subscript out of bounds’. > computeResponse <- function(data){ + dataodd <- data[-(1:18),] + dataodd <- dataodd[seq(1,nrow(dataodd), 2),] + hitsodd <- table(factor(dataodd[,5]), factor(dataodd[,15]

Re: [R] use value in variable to be name of another variable

2016-07-12 Thread David L Carlson
It appears that you are just trying to use the first row to create a column name for the rest of the column. If that is all you are doing something like this is quicker, but it uses the data frame. > set.seed(42) > tTargTFS <- data.frame(matrix(replicate(100, paste0(sample(LETTERS, 6), > colla

Re: [R] Linear model vs Mixed model

2016-07-12 Thread Thierry Onkelinx
The parametrisation is different. The intercept in model 1 is the effect of the "average" subject at days == 0. The intercept in model 2 is the effect of the first subject at days == 0. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Bio

[R] Linear model vs Mixed model

2016-07-12 Thread Utkarsh Singhal
Hi experts, While the slope is coming out to be identical in the two methods below, the intercepts are not. As far as I understand, both are formulations are identical in the sense that these are asking for a slope corresponding to 'Days' and a separate intercept term for each Subject. # Model-1

Re: [R] gsl package installation problem: gsl-config not found (even though gsl has been installed)

2016-07-12 Thread Ismail SEZEN
> $ /home/pyangac/dev/bin/gsl-config --libs > -L/home/pyangac/dev/lib -lgsl -lgslcblas -lm > > $ /home/pyangac/dev/bin/gsl-config --cflags > -I/home/pyangac/dev/include > > $ LDFLAGS="-L/home/pyangac/dev/lib -lgsl -lgslcblas -lm"; export LDFLAGS > $ CPPFALGS="-I/home/pyangac/dev/include"; export

[R] install.packages: Option to keep build directory?

2016-07-12 Thread Loris Bennett
Hi, I'm trying to install the package 'nloptr' and am getting the error configure: error: in `/scratch/tmp/RtmpJ2Y1xA/R.INSTALL3b35583b483/nloptr': configure: error: C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details I would like to check 'config.log', but the