Re: [R] calling plot

2016-02-09 Thread Spencer Graves
Hi, Bert: On 2/9/2016 11:46 AM, Bert Gunter wrote: Oh, yes certainly. But I thought the point was to avoid "cheating" with with() or assuming that the "x" argument was a formula. Yes, my "smarter" solution doesn't work -- my error. I still think there must be a small tweak to fix it, but I

Re: [R] calling plot

2016-02-09 Thread Bert Gunter
Well, this may not be the most elegant, but how about: plotxy <- function(x,data = NULL,...) { mcall <- match.call() if(inherits(x,"formula")) enc <- environment(x) else enc <- parent.frame() if(!is.null(data)){ env <- data mcall <- mcall[-match("data",names(mcall))]

Re: [R] syntax for nested random factors in lme

2016-02-09 Thread Thierry Onkelinx
Dear Kathleen, R sig mixed models is more suited for questions on mixed models. It doesn't make sense to add the main effect of B to both the fixed and the random. Use me(x~y+B,random=~1|B:A) instead. 1|B:A is the interaction between B and A. Since B is in the fixed effects, it is equivalent to

Re: [R-es] Paquete para elevar un matriz a una potencia real

2016-02-09 Thread Olivier Nuñez
require(expm) M <- matrix(c(1,0,1,1),2,2) M [,1] [,2] [1,]11 [2,]01 sqrt.M=expm(.5*logm(M)) sqrt.M%*%sqrt.M [,1] [,2] [1,]11 [2,]01 Un saludo. Olivier - Mensaje original - De: "albert dorador" Para:

[R-es] Paquete para elevar un matriz a una potencia real

2016-02-09 Thread albert . dorador
Saludos a todos! Conoceis algun paquete que permita elevar una matriz a cualquier potencia, sin la limitacion de que la potencia haya de ser un entero? Se que existe el paquete expm que implementa el operando %^%, pero la potencia ha de ser necesariamente un entero (i.e. no permite elevar

Re: [R] How to extract same columns from identical dataframes in a list?

2016-02-09 Thread S Ellison
Does do.call('cbind', list_of_dataframes) do what you want? S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Wolfgang > Waser > Sent: 09 February 2016 09:03 > To: Dénes Tóth; r-help@r-project.org > Subject: Re: [R] How to extract same

Re: [R] pearson correlation matrix

2016-02-09 Thread S Ellison
> -Original Message- > > Assuming your dataset is in a matrix you want to transpose it. So you > > can go t(mesdonnees) and then call cor on that. > > ok, it will still make sense ? If the idea does not make sense before you do it, it probably won't make more sense afterwards ... But

Re: [R] Help required for Rcmdr

2016-02-09 Thread Fox, John
Dear Sekhar, The Rcmdr package, including a Windows binary, *is* available for version 3.2.3 (the current version) of R, as you can verify from the CRAN webpage for the package, at . My guess is that the CRAN mirror you're using has a

Re: [R] Help required for Rcmdr

2016-02-09 Thread Vito M. R. Muggeo
dear all, I don't know if that problem is related to the Rcmdr package itself.. (Sekhar try to install any other packages..) I am experiencing the same problem, in that when typing > install.packages("_ANY_PACKAGE_") I get the message Warning message: package ‘_ANY_PACKAGE_’ is not available

Re: [R] How to extract same columns from identical dataframes in a list?

2016-02-09 Thread Wolfgang Waser
Hi, sorry if my description was too short / unclear. > I have a list of 7 data frames, each data frame having 24 rows (hour of > the day) and 5 columns (weeks) with a total of 5 x 24 values [1] week1 week2 week3 ... 1 x a m ... 2 y b n 3

Re: [R] How to extract same columns from identical dataframes in a list?

2016-02-09 Thread Ulrik Stervbo
Hi Wolfgang, If you use cbind in the do.call you get something close to what you want. You can then use grep to get just the columns you are interested in (I assume they all have the same name in the original data.frames) dfa <- data.frame(cola = c(6:10), colb = c(1:5), colc = c(11:15)) dfb <-

[R] R hangs when plot() is used

2016-02-09 Thread ashutosh srivastava
Dear R users I have compiled R from source in local user account (at non default location). R seems to be working fine but issuing plot() command opens a window (supposedly graph, but nothing is visible) and then R terminal also freezes. Any suggestions? Following is the session info output. >

Re: [R] R hangs when plot() is used

2016-02-09 Thread Jeff Newmiller
Read the Posting Guide... you are in the wrong forum. -- Sent from my phone. Please excuse my brevity. On February 8, 2016 11:24:36 PM PST, ashutosh srivastava wrote: >Dear R users > >I have compiled R from source in local user account (at non default >location). R seems

Re: [R] Help required for Rcmdr

2016-02-09 Thread Sekhar Venkatesan
Dear Mr. Murdoch, I am extremely sorry to have sent the mail to you instead of R-help. Thanks for directing me. I have downloaded R 3.2.3 version. After that i asked for install.packages("Rcmdr") . It says that Rcmdr is not available with version 3.2.3. On looking at the pdf file for getting

Re: [R] missing value where TRUE/FALSE needed ERROR

2016-02-09 Thread Maram SAlem
Thanks for helping thanoon. I used the if() { } else { . } and it worked better On 9 February 2016 at 15:56, thanoon younis wrote: > Hi, > > Try to check

Re: [R] How to extract same columns from identical dataframes in a list?

2016-02-09 Thread peter dalgaard
Like this? > l <- replicate(3,data.frame(w1=sample(1:4),w2=sample(1:4)), simplify=FALSE) > l [[1]] w1 w2 1 2 2 2 3 3 3 1 1 4 4 4 [[2]] w1 w2 1 3 4 2 2 2 3 1 3 4 4 1 [[3]] w1 w2 1 1 4 2 4 3 3 2 1 4 3 2 > sapply(l,"[[",2) [,1] [,2] [,3] [1,]244 [2,]

Re: [R] Help required for Rcmdr

2016-02-09 Thread Fox, John
Dear Vito, I've never experienced this problem myself in a general way, and I'm sure that Windows users of R call install.packages() all the time to install packages from CRAN mirrors. So the question to ask, I think, is what's preventing install.packages() from working in your case --

[R] missing value where TRUE/FALSE needed ERROR

2016-02-09 Thread Maram SAlem
Hi all, I'm trying to write a function to implement a Metropolis-within-Gibbs algorithm for two parameters.I'm including a naive version here so as to be able to spot the error I got. So I first generate the vectors, X and R, that will help to start the algorithm using (for example): n=8; m=5;

Re: [R] Help required for Rcmdr

2016-02-09 Thread Vito M. R. Muggeo
dear John, Thanks for your prompt reply Il 09/02/2016 16.23, Fox, John ha scritto: Dear Vito, I've never experienced this problem myself in a general way, Me too. I have always installed R packages straightforwardly.. and I'm sure that Windows users of R call install.packages() all the time

Re: [R] calling plot

2016-02-09 Thread Bert Gunter
Spencer, et. al.: As I suspected, my previous "solution" was pretty stupid. Here is, I think, the "right" way to go about it: plotxy <- function(x,...){ mcall <- match.call(expand.dots=FALSE) mcall[[1]]<- plot.default eval(mcall) } Best, Bert Bert Gunter "The trouble with having

Re: [R] Help required for Rcmdr

2016-02-09 Thread Richard M. Heiberger
Several of my students have had this type of difficulty with Rstudio. Rstudio masks install.packages with a similarly named function in an environment that does not appear in either conflicts(details=TRUE) or in search(). The workaround is an explicit call to utils

Re: [R] Help required for Rcmdr

2016-02-09 Thread Fox, John
Hi Rich, > -Original Message- > From: Richard M. Heiberger [mailto:r...@temple.edu] > Sent: February 9, 2016 4:57 PM > To: Vito M. R. Muggeo > Cc: Fox, John ; Sekhar Venkatesan > ; Duncan Murdoch >

Re: [R] platform dependent regex

2016-02-09 Thread jim holtman
why 3 parameters on the 'grepl'? Did you mean to say: ​grepl("\\W", "س") # FALSE Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Tue, Feb 9, 2016 at 11:55 AM, Ista Zahn wrote: > I

Re: [R] calling plot

2016-02-09 Thread Spencer Graves
On 2/9/2016 9:51 AM, Bert Gunter wrote: Spencer, et. al.: As I suspected, my previous "solution" was pretty stupid. Here is, I think, the "right" way to go about it: plotxy <- function(x,...){ mcall <- match.call(expand.dots=FALSE) mcall[[1]]<- plot.default eval(mcall) }

[R] platform dependent regex

2016-02-09 Thread Ista Zahn
I just spent a day and a half debugging someone's code, only to discover that the problem is platform dependent regular expressions. For example: ## Windows: grepl("\\W", "", "س") # TRUE ## OS X: grepl("\\W", "", "س") # TRUE ## Linux: grepl("\\W", "", "س") # FALSE Ouch. The documentation

Re: [R] Help in meta-analysis (URGENT please)

2016-02-09 Thread Michael Dewey
Dear Rosa I suggest reformatting your dataset to have four variables (a) study (2) MSM yes or no (3) number with HIV (4) total number. Then you can use any of the options in metafor (look for outcomes for individual groups in ?escalc) and use MSM as a moderator. Is there any reason why you

[R] GPU package crowd-source testing

2016-02-09 Thread Charles Determan
Greetings R users, I would like to request any users who would be willing to test one of my packages. Normally I would be content using testthat and continuous integration services but this particular package is used for GPU computing (hence the cross-posting). It is intended to be as general

[R] Revolutions blog: January 2016 roundup

2016-02-09 Thread David Smith
Since 2008, Microsoft (formerly Revolution Analytics) staff and guests have written about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. And in case

[R] generate levels with different number of replications with gl() function

2016-02-09 Thread hehsham alpukhity via R-help
I am trying to use the function gl (generate levels with different number of replications), generate different number of replications in each level.examplei have factor with this levels (BR,CNS ,CO,LE,ME,LC,OV,PR,RE),  and the replications is not the same , i want (4 replication for BR),( 6

[R-es] Resultados electorales

2016-02-09 Thread Proyecto R-UCA
Buenas: Alguien ha hecho algo (que est� dispuesto a compartir) o conoce algo para "digerir" los resultados electorales que hay en http://www.infoelectoral.interior.es/min/ [ http://www.infoelectoral.interior.es/min/ ] �O conoce alg�n otro sitio desde el que se puedan descargar en otro

Re: [R] Complete archives for MARC needed for r-devel, r-help and r-packages

2016-02-09 Thread David Winsemius
> On Feb 9, 2016, at 7:15 PM, Tae Wong wrote: > > I need the archives for r-help from October 2007 to November 2013 in MARC [1]. > > The same goes for r-devel [2] who needs archives for July 2005 to > November 2013 and r-packages [3] needing archives for August 2007 to

[R] Complete archives for MARC needed for r-devel, r-help and r-packages

2016-02-09 Thread Tae Wong
I need the archives for r-help from October 2007 to November 2013 in MARC [1]. The same goes for r-devel [2] who needs archives for July 2005 to November 2013 and r-packages [3] needing archives for August 2007 to December 2013. P.S.: I'm not subscribed to this mailing list. [1]

Re: [R] platform dependent regex

2016-02-09 Thread Ista Zahn
Hi Jim, Bah, yes, I meant, ## Windows: grepl("\\W", "س") # TRUE ## OS X: grepl("\\W", "س") # TRUE ## Linux: grepl("\\W", "س") # FALSE Sorry about that. My original example was with gsub, but I thought changing to grepl example was clearer. Thank you. -- Ista On Tue, Feb 9, 2016 at

Re: [R] calling plot

2016-02-09 Thread Bert Gunter
Oh, yes certainly. But I thought the point was to avoid "cheating" with with() or assuming that the "x" argument was a formula. Yes, my "smarter" solution doesn't work -- my error. I still think there must be a small tweak to fix it, but I haven't figured it out yet. AFAICS, my earlier "stupid"

Re: [R-es] [help] Heatmaps con escala discreta con stat_bin2dystat_density2d.

2016-02-09 Thread Javier Marcuzzi
Estimado Javier Villacampa González Entiendo que no es un análisis de la imagen, sino el colocar puntos detectados por un movimiento (“ocular”) detectando donde enfoca la mirada. Hay una librería en R donde siguen los movimientos de animales desde unas cámaras, básicamente si el animal