[R] Fwd: ERROR - non-conformable arguments

2015-09-20 Thread Alexander Moßbrucker
Hi, I am using adehabitatHS for habitat selection analysis using widesII(), when running the script I get the error message: Error in as.vector(X) %*% t(as.vector(Y)) : non-conformable arguments Here the script I am using including the data > #dataset (read from tab deliminated text file) > >

Re: [R] How to coerce a parameter in nls?

2015-09-20 Thread Jianling Fan
no, I am doing a regression with 6 group data with 2 shared parameters and 1 different parameter for each group data. the parameter I want to coerce is for one group. I don't know how to do it. Any suggestion? Thanks! On 19 September 2015 at 13:33, Jeff Newmiller

Re: [R] Fwd: ERROR - non-conformable arguments

2015-09-20 Thread Jeff Newmiller
To debug this kind of problem you really need to use dput() to provide the data in your email. [1] [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff Newmiller

Re: [R] what is the effective method to apply the below logic for ~1.2 million records in R

2015-09-20 Thread Ista Zahn
Hi Ravi, Did you try fixing the problem? What did you try and what went wrong? The answer is probably A <- as.data.table(A) A[ , g15 := cumsum(ifelse(is.na(Time_Diff > 12), 0, Time_Diff > 12))] A[ , flag_1 := 1:.N, by = c("customer", "g15")] A[ , g15 := NULL] but you would have learned more if

[R] Unexpected/undocumented behavior of 'within': dropping variable names that start with '.'

2015-09-20 Thread Brian
Dear List, Somewhere I missed something, and now I'm really missing something! > d.f <- data.frame(.id = c(TRUE, FALSE, TRUE), dummy = c(1, 2, 3), a = c(1, 2, 3), b = c(1, 2, 3) + 1) > within(d.f, {d = a + b}) dummy a b d 1 1 1 2 3 2 2 2 3 5 3 3 3 4 7 > d.f <- data.frame(.id

Re: [R] HELP IN GRAPHS - slip screen (URGENT)

2015-09-20 Thread Rosa Oliveira
Dear Jim, I’ve tried till today, but I could not solve the problems. 1. despite the scales are the same (equal: lambda ={0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 0.98}), the "matrix" is not equal. If you see, for n = 250 the column is narrower than for n = 1000, and "lambda" has the same values.

Re: [R] Unexpected/undocumented behavior of 'within': dropping variable names that start with '.'

2015-09-20 Thread Hadley Wickham
The problem is that within.data.frame calls as.list.environment with the default value of all.names = FALSE. I doubt this is a deliberate feature, and is more likely to be a minor oversight. Hadley On Sun, Sep 20, 2015 at 11:49 AM, Brian wrote: > Dear List, > > Somewhere I

Re: [R-es] Problemas con rmarkdown

2015-09-20 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? Yo creo que el problema no está en R. Aparentemente, ya has generado el fichero .md que pandoc "traduce" a pdf. ¿Puedes ver el fichero .md correctamente? ¿Lo has generado a partir de un Rmd? ¿Puedes generar el pdf directamente desde RStudio a partir del Rmd (si es que lo hay)?

Re: [R-es] Problemas con rmarkdown

2015-09-20 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? ¿Puedes probar a ejecutar los "chunks" del documento original uno a uno? ¿Funcionan todos? ¿Tienes errores en alguno? (En RStudio puedes ejecutar todos los "chunks" desde los menús; también los puedes ejecutar uno a uno si ves algo raro). Un saludo, Carlos J. Gil Bellosta