[R] coeftest() R squared

2017-02-14 Thread T.Riedle
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 neither returns the adjusted R squared

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

2017-02-14 Thread Hervé Pagès
On 02/14/2017 06:39 PM, Bert Gunter wrote: Yes, exactly. So my point is that this: "X: a vector-like object that supports subsetting with `[`, typically an atomic vector." is incorrect, or at least a bit opaque, without further emphasizing that FUN must accept the result of "[".

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

2017-02-14 Thread Bert Gunter
Yes, exactly. So my point is that this: "X: a vector-like object that supports subsetting with `[`, typically an atomic vector." is incorrect, or at least a bit opaque, without further emphasizing that FUN must accept the result of "[". With atomic vectors, the error that you produced

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

2017-02-14 Thread Hervé Pagès
Right. More precisely the function passed thru the FUN argument must work on the subsets of X generated internally by tapply(). You can actually see these subsets by passing the identity function: X <- letters[1:10] INDEX <- c(rep(1,5),rep(2,5)) tapply(X, INDEX, FUN=identity) # $`1` #

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

2017-02-14 Thread Richard M. Heiberger
The problem with Bert's second example is that sum doesn't work on a list. The tapply worked correctly. > unlist(l[1:5]) [1] 1 2 3 4 5 > sum(l[1:5]) Error in sum(l[1:5]) : invalid 'type' (list) of argument On Tue, Feb 14, 2017 at 8:28 PM, Bert Gunter wrote: > Hervé: >

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

2017-02-14 Thread Bert Gunter
Hervé: Kindly explain this, then: > l <- as.list(1:10) > is.atomic(l) # FALSE [1] FALSE > index <- c(rep(1,5),rep(2,5)) > > > tapply(l,index,unlist) $`1` [1] 1 2 3 4 5 $`2` [1] 6 7 8 9 10 > > ## But > > tapply(l,index, sum) Error in FUN(X[[i]], ...) : invalid 'type' (list) of argument

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

2017-02-14 Thread Hervé Pagès
Hi, tapply() will work on any object 'X' that has a length and supports single-bracket subsetting. These objects are sometimes called "vector-like" objects. Atomic vectors, lists, S4 objects with a "length" and "[" method, etc... are examples of "vector-like" objects. So instead of saying X:

[ESS] Help in compiling ESS

2017-02-14 Thread Paola.Giovannini
Dear ESS experts, I've always been using emacs as an editor and recently I started to work with R, therefore I would be very happy to be able to use the functionality of ESS. I don't have my own linux computer but I use machines on a farm, so I don't have access to the installation of emacs or

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

2017-02-14 Thread Carlos Ortega
​Hola, Recordaba que sí que se podía hacer con data.table Efectivamente... > library(data.table) > x_dt <- data.table( a= rnorm(10), b = rnorm(10)) > y_dt <- data.table( a= rnorm(10), b = rnorm(10), c = rnorm(10)) > > l <- list(x_dt, y_dt) > rbindlist(l, fill = TRUE) a

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

2017-02-14 Thread Bert Gunter
Did you ever receive a reply to this? Note that for your example: > tapply(l,index,sum) Error in FUN(X[[i]], ...) : invalid 'type' (list) of argument A list is definitely not atomic (is.recursive(l) ). So it looks like a "quirk" that FUN = unlist doesn't raise an error. Cheers, Bert Bert

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

2017-02-14 Thread Xavi tibau alberdi
Buenas, lo que buscas se puede hacer con el paquete dplyr, con el comando full_join(). dplyr es extremadamente recomendable para la manipulación de datasets, y en general todos los paquetes incluidos en tidyverse.. Aquí tienes el cheatsheat:

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

2017-02-14 Thread Bert Gunter
Ulrik: Sheepishly Nitpicking (only because you are a regular and wise R-help contibutor): gganimate is not a library, it's a package. No need to reply. Best, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka

Re: [R] Von Mises mixtures: mu and kappa?

2017-02-14 Thread Bert Gunter
Please search before posting! Searching "von mises mixture distributions" on rseek.org brought up what appeared to be several relevant hits. If none of these meet your needs, you should probably explain why not in a follow up post. Cheers, Bert Bert Gunter "The trouble with having an open

[R] Von Mises mixtures: mu and kappa?

2017-02-14 Thread Peter Mills
Hello I am trying to calculate the values of the concentration parameters (kappa) and preferred direction (mu) for a Von Mises mixture model. I currently have some R code that gives me optimised values for the product of kappa and mu, but I'm not sure how to calculate them when both are

Re: [R] Circular plot

2017-02-14 Thread David L Carlson
This is pretty close to your original plot. To get clockwise we multiply the radians by -1 and then add pi/2 to move the origin to 12 o'clock. We need to flip the start and end values since now we are be plotting from the end to the start: start<-c(1,5,600,820) end<-c(250,75,810,1200)

Re: [R] minpack package in R version 3.3.2

2017-02-14 Thread J C Nash
You probably wanted minpack.lm, not minpack. FYI, Duncan Murdoch and I just put up nlsr on CRAN. It does ANALYTIC derivatives on expression-form nonlinear models, and also handles function-form problems. It does a Marquardt-stabilized solution, and allows fixed parameters by specifying upper

Re: [R] minpack package in R version 3.3.2

2017-02-14 Thread Jeff Newmiller
The primary place for finding out about packages is the Comprehensive R Archive Network, or CRAN. Try entering R package minpack CRAN into Google and you should be able to see what you need to do on your own. If you still need help, tell us what you found and why it didn't help when you post

Re: [R-es] pregunta

2017-02-14 Thread Mauricio Mardones Inostroza
Esta buenisimo para hacerlo con Laticce. Saludos a todos! El 14 de febrero de 2017, 12:49, Carlos Ortega escribió: > Hola José, > > He visto el Excel y he encontrado la hoja oculta donde vienen los cálculos. > El libro de Excel tiene una hoja de entrada de datos, que

Re: [R] Forecasting using VECM

2017-02-14 Thread Bert Gunter
Searching on "VECM" on rseek.org brought up: "VECM" on the Rdocumentation site, which clearly states: "The predict method contains a newdata argument allowing to compute rolling forecasts." If that is not what you want, you'll need to explain why not, I think. If it is, please do such searching

Re: [R] renameSeqlevels

2017-02-14 Thread Martin Morgan
Rsamtools and GenomicAlignments are Bioconductor packages so ask on the Bioconductor support site https://support.bioconductor.org You cannot rename the seqlevels in the bam file; you could rename the seqlevels in the object(s) you have created from the bam file. Martin On 02/14/2017

Re: [R] CAR

2017-02-14 Thread Bert Gunter
Rseek.org brings up what look like relevant hits on "conditional autoregressive models." Have you looked at these? If so and they do not suit, perhaps you should explain why not. If they do, please do such searching on your own in future. Cheers, Bert Bert Gunter "The trouble with having an

[R] CAR

2017-02-14 Thread Siswanto Sumargo
*I would like to simulate spatial data conditional **autoregressive (CAR) model with weighted matrix order 2**Is there any package or function in R to perform it ? **Thanks in advance* *Best Regards Siswanto* -- *Siswanto* Department of Statistics, Faculty of Mathematics and Natural Science

[R] Forecasting using VECM

2017-02-14 Thread Preetam Pal
Hi, I have attached the historical dataset (titled data) containing numerical variables GDP, HPA, FX and Y - I am interested to predict Y given some future values of GDP, HPA and FX. - Some variables are non-statioanry as per adf.test() - I wanted to implement a VECM framework for modeling

[R] renameSeqlevels

2017-02-14 Thread Teresa Tavella
Dear all, I would like to ask if it is possible to change the seqnames of a bam file giving a vector of character to the function renameSeqlevels. This is because in order to use the fuction summarizeOverlap or count/find, the seqnames have to match. >From the bamfile below I have extracted the

[R] minpack package in R version 3.3.2

2017-02-14 Thread Malgorzata Wieteska via R-help
Hello, I'm new to R. I found very useful for me code for parameter estimation. Unfortunately, while trying to install "minpack" I get info, that this package is not available for version 3.3.2. I'm using Windows 10. Does anyone know how to overcome this and maybe a hint on which version of R it

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

2017-02-14 Thread Javier Valdes Cantallopts (DGA)
Hola a todos: Necesito pegar 4 bases de datos de N variables y N columnas, EL PROBLEMA ES QUE 3 CONSTAN DE 13 COLUMNAS, y LA CUARTA CON 11 COLUMNAS. He usado rbind y smartbind, sin embargo el resultado no es el esperado, ya que coloca las columnas a un costado y no hacia abajo como debería Como

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

2017-02-14 Thread Duncan Murdoch
On 14/02/2017 5:53 AM, Shane Carey wrote: Hi, I have many png files that I would like to stitch together, in order to make a gif file. Any ideas how I would do this? ImageMagick is good for this. The magick package in R makes most (all?) of its features available. The image_animate()

[R] VAR for Non Stationary series using R

2017-02-14 Thread Lal Prasad
Hi All, Is there any suggested approaches for using non-stationary series in VAR model? As per otexts.org , there is something like "VAR in differences which could be used for such series. Are there any other

[R-es] pregunta

2017-02-14 Thread jbetancourt
Estimados Adjunto en excel el canal endémico de Bortman, se brindan las tasas de cinco aaños anteriores de cualquier enfermedad endémica y no0s alerta si nos alejamos de la media histórica (media geométrica) los intervalos de confianza son con conversión logaritmica. ¿Es posible traducir este

Re: [R] [FORGED] Re: get() return nothing

2017-02-14 Thread Ben Tupper
Hi, When you want to get 'something' out of a loop you need to assign that 'something' to a variable that persists outside of the loop. I think it is a scoping thing. In your situation you could create a list with as many elements as there are objects with 'txt' in their names. I can't quite

Re: [R-es] Cruce de no Coincidente

2017-02-14 Thread Carlos Ortega
Hola, Sí, mira la función "merge()" que hace justamente lo que buscas. Y en particular el significado de los parámetros que incluye la función del tipo "all.x", "all.y", "all" que te permitirán mostrar los comunes y los no comunes. Gracias, Carlos Ortega www.qualityexcellence.es El 14 de

Re: [R-es] Reintentos de una query en R

2017-02-14 Thread Carlos J. Gil Bellosta
Hola, ¿qué tal? En https://www.datanalytics.com/2015/10/09/madrid-decide-propone-vota-etc/ tienes un ejemplo de una expresión try-catch para controlar ese tipo de problemas. Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El día 14 de febrero de 2017, 11:30, Sergio Castro

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

2017-02-14 Thread Shane Carey
Hi Ulrick, I created the png's in R and was hoping there would be a way of stitching them together in R. Is there a different forum I should be posting to? Thanks On Tue, Feb 14, 2017 at 11:33 AM, Ulrik Stervbo wrote: > Hi Shane, > > Wrong forum. This might be what

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

2017-02-14 Thread Ulrik Stervbo
Hi Shane, Wrong forum. This might be what you are looking for ffmpeg -i %03d.png output.gif Or use the library gganimate. Best Ulrik Shane Carey schrieb am Di., 14. Feb. 2017, 12:08: > Hi, > > I have many png files that I would like to stitch together, in order to >

[R-es] Reintentos de una query en R

2017-02-14 Thread Sergio Castro
Buenos días, Estoy haciendo un script que se conecta a una base de datos externa y en la que crea diferentes tablas. Me estoy encontrando con que la conexion es bastante mala y muchas veces me falla a mitad de script por este motivo. Me gustaría meter esta sentencia de crear la tabla en algún

[R] Create gif from series of png files

2017-02-14 Thread Shane Carey
Hi, I have many png files that I would like to stitch together, in order to make a gif file. Any ideas how I would do this? Thanks -- Le gach dea ghui, Shane [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

Re: [R] [FORGED] Re: get() return nothing

2017-02-14 Thread Rolf Turner
On 14/02/17 05:50, Fix Ace via R-help wrote: Well, I am not trying to print anything. I just would like to get the dimension information for all the dataframes I created. Could you please help me to develop the script? Thanks. Ace Yes you *are* trying to print something. You are trying to