[R] Help with marmap package

2017-02-15 Thread Jake William Andrae
Hello, I'm using the 'Marmap' R package to create ocean bathymetry maps. I've managed quite well, but I'm having a little difficulty with setting my x-axis (longitude) limits. When I run the code, the map is projected with large white bands on either side of the desired longitude limits. I've

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread Manuel Spínola
Hola Luis, Pero son tus argumentos correctos? Yo no veo un método "s". diversitycomp(x, y = NULL, factor1 = NULL ,factor2 = NULL, index=c("Shannon", "Simpson", "inverseSimpson", "Logalpha", "Berger", "richness", "abundance", "Jevenness", "Eevenness", "jack1", "jack2",

Re: [R] New R user- Simple optimization problem

2017-02-15 Thread Bert Gunter
Please cc the list. It's too much trouble for me, but maybe not for someone else. Bert On Feb 15, 2017 6:02 PM, "Brady Richter" wrote: > Bert, > > > > I’m 46- I don’t get homework. Just looking for a bit of help getting > started organizing the loop structure, but

Re: [R] New R user- Simple optimization problem

2017-02-15 Thread Bert Gunter
Homework? If so, we don't do hw here. Otherwise, we usually ask people to show us their failed coding efforts rather than expecting us to do the problem for them. Please read and follow the posting guide. Cheers, Bert On Feb 15, 2017 10:25 AM, "Brady Richter" wrote:

[R] Validating Minitab's "Expanded Gage R Study" using R and lme4

2017-02-15 Thread Matt Jacob
I'm trying to validate the results of an "Expanded Gage R Study" in Minitab using R and lme4, but I can't get the numbers to match up in certain situations. I can't tell whether my model is wrong, my data is bad, or something else is going on. For instance, here's some data for which the results

Re: [R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Rubén Coca
La función rbindlist del paquete data.table debería servir: a <- data.frame(a = rep("a", 10), b = rep(10, 10)) b <- data.frame(a = rep("b", 20), b = rep(12, 20)) lista <- list(a, b) library(data.table) zz <- rbindlist(lista) Saludos, Rubén [[alternative HTML version deleted]]

Re: [R] Is a list an atomic object? (or is there an issue with the help page of ?tapply ?)

2017-02-15 Thread Hervé Pagès
You could also call this "interesting example" a bug. Clearly not enough code reuse in the implementation of tapply(). Instead of the current 25 lines of code, it could be a simple wrapper around split() and sapply() e.g.. something like: tapply2 <- function(X, INDEX, FUN=NULL, ...,

Re: [R] non-linear optimisation ODE models

2017-02-15 Thread Jim Lemon
Hi Malgorzata, The function "rxnrate" seems to want three values in a list with the names "k1", "k2" and "k3". If you are passing something with different names, it is probably going to complain, so the names "A", "B" and "C" may be your problem. I can't run the example, so this is a guess. Jim

Re: [R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Carlos Ortega
Hola, También con "purrr" puedes hacer esto directamente: library(purrr) my_list <- flatten_df(post_ss) Saludos, Carlos Ortega www.qualityexcellence.es El 15 de febrero de 2017, 21:44, Víctor Granda García < victorgrandagar...@gmail.com> escribió: > Este script hace lo que quieres usando

Re: [R-es] problemas con rBIND con distintos número de columnas

2017-02-15 Thread Víctor Granda García
Como ha comentado Xavier Tibau antes, todo el problema se soluciona usando bind_rows del paquete dplyr: library(dplyr) foo <- bind_rows(tabla1, tabla2, tabla3, tabla4) sin complicarse mucho la vida (salvo instalar dplyr). Según la ayuda de bind_rows: "columns are matched by name, and any values

Re: [R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Víctor Granda García
Este script hace lo que quieres usando dplyr y purrr (tidyverse, ultima version disponible), lo adjunto también por si en el correo no se ve bien library(purrr) library(dplyr) foo <- post_ss %>% # primero juntamos los tres data frames de cada elemento de la lista purrr::at_depth(1,

Re: [R] Is a list an atomic object? (or is there an issue with the help page of ?tapply ?)

2017-02-15 Thread Hadley Wickham
It seems like this should be consistent with split(), since that's what actually powers the behaviour. Reading the description for split leads to this rather interesting example: tapply(mtcars, 1:11, I) Hadley On Tue, Feb 14, 2017 at 7:10 PM, Hervé Pagès wrote: > Hi, > >

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread Luis E
Carlos, Creo que el problema esta en que biodiversityR que al alcalizare el parámetro “method “ cambio, ahora usa otros comando para calcular los indices estadísticos de diversidad: Method of calculating the diversity statistics: "pooled" calculates the diversity of the entire community (all

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread Carlos Ortega
Hola, El error te está diciendo que para el parámetro "method" lo que usas "s" no se acepta... ¿Qué dice la ayuda sobre los valores posibles del parámetro "method"?. Saludos, Carlos Ortega www.qualityexcellence.es El 15 de febrero de 2017, 18:52, Luis E escribió: >

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread Luis E
Estimados, Muchas gracias por sua ayuda, ya pude instalar data.table y esta funcionando. Respecto al paquete biodiversityR, no se porque ahora no me corre. El script esta correcto, pero no se porque me tira error. > fase<-diversitycomp(biobsp, >

Re: [R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Manuel J . Sánchez Franco
Carlos: Agradecido por tu interés. Adjunto la lista que me solicitas. Saludos, Manuel --- ___ El 15/02/2017 17:45, Carlos Ortega escribió: > Hola, > > ¿Puedes pasar parte de estas listas para no picar un ejemplo desde cero... ? >

Re: [R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Carlos Ortega
Hola, ¿Puedes pasar parte de estas listas para no picar un ejemplo desde cero... ? Puedes pasarlo en un fichero ".RData" Y si te da problemas el adjuntarlo a toda la lista, me lo envías y lo pruebo... Gracias, Carlos Ortega www.qualityexcellence.es El 15 de febrero de 2017, 17:22, Manuel J.

[R-es] convertir múltiples listas de múltiples dataframes en un único dataframe

2017-02-15 Thread Manuel J . Sánchez Franco
Dispongo de 10 listas, cada una de ellas es, a su vez, una lista de 3 data.frame. Trato de convertirlo todo en un único data.frame. Señalo que los data.frame son de diferente número de observaciones y variables. He probado todo, y ¡zas! nada. Ruego amablemente alguna ayuda. Manuel J.

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread Carlos Ortega
Ya... El problema que pareces tener en tu Mac es que no tienes ninguna librería de desarrollo instalada y no puedes compilar data.table. ¿Tienes instalado el Xcode?. Es la aplicación de desarrollo (gratuita) para Mac del propio Apple. Esta aplicación contiene diferentes compiladores que te

Re: [R-es] paquete Rcmdr y BiodiversityR

2017-02-15 Thread José Trujillo Carmona
No soy de Mc, pero igual esto te ayuda. http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/ Saludos. El 15/02/17 a las 16:36, Luis E escribió: Gracias Carlos, ya intente instalar varias veces el paquete

Re: [R-es] problemas con rBIND con distintos número de columnas

2017-02-15 Thread Carlos J. Gil Bellosta
Si tu info es toda numérica y cada tabla tiene una clave primaria, siempre puedes: 1) Hacer un melt por clave primaria de cada tabla para dejarla en formato largo. 2) Apilar las tablas obtenidas con el do.call + rbind de toda la vida. 3) Hacer un cast para dejarla cuadrada de nuevo. Así no

[R] New R user- Simple optimization problem

2017-02-15 Thread Brady Richter
Hi I am learning R currently and I having trouble structuring a program. Data consists of 1 data frame with a day of the week, a class list, and a utility score. Date Class Utility Monday Chem 85 Monday

Re: [R] Works outside but not inside!

2017-02-15 Thread Sarah Goslee
Well, what happens? "Doesn't work" covers a lot of ground, and you don't provide a reproducible example. Also, why all the > at the beginning PDF lines? Your R prompts shouldn't look like that when entering a function, and they make it impossible to just cut and paste the code. Not that we have

[R] Works outside but not inside!

2017-02-15 Thread Keith S Weintraub
Folks, The following function works like a charm! > #Amortization for multiple rows > createAmorts<-function(ams, numPer, term) { > fctrs<-rep(1:term, each = numPer) > > oneRow<-function(am, fac){ > tdf<-data.frame(ams = c(am), yrs=fac) > agg<-aggregate(ams ~ yrs, data

Re: [R] non-linear optimisation ODE models

2017-02-15 Thread Berend Hasselman
> On 15 Feb 2017, at 11:32, Malgorzata Wieteska via R-help > wrote: > > Hello, > I'm new to R, so sorry for this question. I found a piece of code on stack > overflow community, title: r-parameter and initial conditions fitting ODE > models with nls.lm. > I've tried to

[R] non-linear optimisation ODE models

2017-02-15 Thread Malgorzata Wieteska via R-help
Hello, I'm new to R, so sorry for this question. I found a piece of code on stack overflow community, title: r-parameter and initial conditions fitting ODE models with nls.lm. I've tried to implement a change suggested, but I get an error: Error in unname(myparms[4], B = 0, C = 0) :   unused

Re: [ESS] Help in compiling ESS

2017-02-15 Thread Paola.Giovannini
Dear Steven, I did as you said, thanks, I missed the "Optionally" that was written before the compilation description. Therefore I added the two lines (add-to-list 'load-path "/home/giovannp/ess/ess-16.10/lisp/") (load "ess-site") At the end of my .emacs file. The second line produces the

Re: [R] Create gif from series of png files

2017-02-15 Thread Shane Carey
For those interested, I figured out a way using "convert" on the linux command line. Thanks On Tue, Feb 14, 2017 at 6:02 PM, Bert Gunter wrote: > Ulrik: > > Sheepishly Nitpicking (only because you are a regular and wise R-help > contibutor): > > gganimate is not a

Re: [R] coeftest() R squared

2017-02-15 Thread Achim Zeileis
On Wed, 15 Feb 2017, T.Riedle wrote: Dear all, I want to run a regression using lm() with Newey West corrected standard errors. This is the code Reg<-lm(g~sent + liquidity + Cape, data=dataUsa) CoefNW<-coeftest(Reg, vcov.=NeweyWest) CoefNW In contrast to summary(Reg) the output of CoefNW