Re: [R] Unable to Load package Rcmdr after installation

2017-03-09 Thread Ulrik Stervbo
Hi Paul, what fails and how? What did you do from the time the package worked until is didn't? Did you update packages? Which packages are you trying to load? Best Ulrik On Thu, 9 Mar 2017 at 18:40 paulberna...@gmail.com wrote: > Thanks Ulrik, but the thing is that I

[R] restructuring data frame

2017-03-09 Thread PIKAL Petr
Dear all I have some data with following structure in data frame. dput(evid[1:2,c(2:4)]) evid <- structure(list(V2 = c("test vodivosti kalcinátu", "impregnace anatasové pasty rozprašovací sušárna" ), V3 = c("03.03.2017", "17.03.2017"), V4 = c("EICHLER Věra;#125", "HOŠŤÁLKOVÁ

Re: [R] concatenating range of columns in dataframe

2017-03-09 Thread Ulrik Stervbo
Hi Evan, the unite function of the tidyr package achieves the same as Jim suggested, but in perhaps a slightly more readable manner. Ulrik On Fri, 10 Mar 2017 at 07:50 Jim Lemon wrote: > Hi Evan, > How about this: > >

Re: [R] concatenating range of columns in dataframe

2017-03-09 Thread Bert Gunter
I think you need to spend some time with an R tutorial or two, especially with regard to indexing. Unless I have misunderstood (apologies if I have), df$Conc <- apply(df[,-1],1,paste,collapse="") does it. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] Negative binomial GAMM using 'by' in factor interactions

2017-03-09 Thread Bert Gunter
Your queries appear to concern statistical issues. This list is about R programming and related; statistical issues are typically OT here. stats.stackexchange.com or a local statistical expert are probably better places to seek statistical advice. Cheers, Bert Bert Gunter "The trouble with

Re: [R] concatenating range of columns in dataframe

2017-03-09 Thread Jim Lemon
Hi Evan, How about this: df2<-data.frame(Trt=df[,1],Conc=apply(df[,2:5],1,paste,sep="",collapse="")) Jim On Fri, Mar 10, 2017 at 3:16 PM, Evan Cooch wrote: > Suppose I have the following data frame (call it df): > > Trt y1 y2 y3 y4 > A1A 1001 > A1B 1

Re: [R] matrix merge, or something else?

2017-03-09 Thread Jeff Newmiller
test2[ , colnames( test1 ) ] <- test1 -- Sent from my phone. Please excuse my brevity. On March 9, 2017 6:56:13 PM PST, Evan Cooch wrote: >Suppose I have the following two matrices, both with same number of >rows >(3), but different number of columns (3 in test1, 4 in

[R] concatenating range of columns in dataframe

2017-03-09 Thread Evan Cooch
Suppose I have the following data frame (call it df): Trt y1 y2 y3 y4 A1A 1001 A1B 1100 A1 C 0 10 1 A1D 111 1 What I want to do is concatenate columns y1 -> y4 into a contiguous string (which I'll call df$conc), so that the final df looks

[R] Negative binomial GAMM using 'by' in factor interactions

2017-03-09 Thread Eva Maria Leunissen
I am using a GAMM to model my data (this is as far as I know the only way I can use the negative binomial distribution AND a correlation structure within the model). I measured animal detections (including zero detections) per hour at 3 different locations in an area. location is a factor in my

[R] R2WinBUGS Error

2017-03-09 Thread Liu, J.
Hi, I'm trying to run R2WinBUGS using the R code below (Thinkpad Yoga 260, Win8, system x86_64, mingw32, R version 3.3.1). It worked fine for several times but then one error began to pop up in every run: command #Bugs:set cannot be executed (is greyed out). I've been trying for more than one

[R] matrix merge, or something else?

2017-03-09 Thread Evan Cooch
Suppose I have the following two matrices, both with same number of rows (3), but different number of columns (3 in test1, 4 in test2). test1 <- matrix(c(1,1,0,1,0,-1,-1,-1,0),3,3,byrow=T); test2 <- matrix( rep( 0, len=12), nrow = 3) I label the rows and columns of the two matrices as follows:

Re: [R] how apply.monthly() in package xts works

2017-03-09 Thread Joshua Ulrich
On Thu, Mar 9, 2017 at 3:46 PM, Joshua Ulrich wrote: > On Thu, Mar 9, 2017 at 3:31 PM, Waichler, Scott R > wrote: >> Hi, >> >> I found that apply.monthly() in xts does not work as I expected in the case >> of a sparse timeseries: >> >> my.dates

Re: [R] how apply.monthly() in package xts works

2017-03-09 Thread Joshua Ulrich
On Thu, Mar 9, 2017 at 3:31 PM, Waichler, Scott R wrote: > Hi, > > I found that apply.monthly() in xts does not work as I expected in the case > of a sparse timeseries: > > my.dates <- as.Date(c("1992-06-01", "1992-06-24", "1992-06-30", "1993-06-22", > "1994-06-07",

[R] how apply.monthly() in package xts works

2017-03-09 Thread Waichler, Scott R
Hi, I found that apply.monthly() in xts does not work as I expected in the case of a sparse timeseries: my.dates <- as.Date(c("1992-06-01", "1992-06-24", "1992-06-30", "1993-06-22", "1994-06-07", "1995-06-08")) my.xts <- xts(1:6, my.dates) start(my.xts) # "1992-06-24" end(my.xts) #

Re: [R] Problem with greek characters in R

2017-03-09 Thread Nordlund, Dan (DSHS/RDA)
Dimitrios, You need to help us help you. You say you have a file that has Greek characters in it that you want to "open with the program RGui". 1. You need to provide us with a sample of the problem file. Since we are talking about text here, you can create a file with just a few lines in it

Re: [R] Problem with greek characters in R

2017-03-09 Thread Ista Zahn
On Thu, Mar 9, 2017 at 11:48 AM, Jeff Newmiller wrote: > The standard response is that RStudio is not R, and has its own forum or > discussion areas on stackexchange.com. But the OP didn't mention RStudio, but rather RGui. R has its own mechanisms for dealing with

Re: [R] Reverse the scoring of some Columns of a Data Set

2017-03-09 Thread Nordlund, Dan (DSHS/RDA)
Another alternative (which didn't work last night when I was tired and obviously doing something wrong) is to use the built-in function, rev(): df[,1:3] <- apply(df[,1:3], 2, rev) Dan Daniel Nordlund, PhD Research and Data Analysis Division Services & Enterprise Support Administration

Re: [R] Problem with greek characters in R

2017-03-09 Thread Jeff Newmiller
The standard response is that RStudio is not R, and has its own forum or discussion areas on stackexchange.com. R has its own mechanisms for dealing with alternate character sets, so be clear when the problem is in the processing of such code by R versus the display of input or output files

Re: [R] Transport and Earth Mover's Distance

2017-03-09 Thread Schuhmacher, Dominic
> Am 08.03.2017 um 11:28 schrieb Schuhmacher, Dominic > : > > ... >>> >>> If you have no particular need for binning, check out the function >>> pppdist in the R-package spatstat, which offers a more flexible way >>> to deal with point patterns

Re: [R] Unable to Load package Rcmdr after installation

2017-03-09 Thread Jeff Newmiller
To the question of why it used to work but now it doesn't, I have noticed that often when I update packages with dependencies but some error occurs during the update, some existing packages that used to work are removed and must be re-installed manually. I have not tried to make a reproducible

[R] modify additional parameters, glht and summary

2017-03-09 Thread Cristiano Alessandro
Hi all, first of all, thanks a lot in advance for your help. I am running a sequence of post-hoc tests with glht (mutcomp package), but the function summary warns me that the algorithm ends with an error > abseps. $ hr.ph <- glht(hr.lm, linfct = ph_conditional); $ summary(hr.ph) Warning

[R] Problem with greek characters in R

2017-03-09 Thread Dimitrios Mousenikas
Hello, My computer functions with the version of English windows 10. The problem that I face is that when I open an R file that includes Greek characters, with the program RGui, the text that appears does not make sense. The only way the problem can be solved is by setting Greek as a default

Re: [R] Unable to Load package Rcmdr after installation

2017-03-09 Thread Ulrik Stervbo
Hi Paul, The error tells you, that the 'Hmisc' does not exist on your system. If you install it, everything should work. Use install.packages with dependencies = TRUE to avoid the problem of missing packages. HTH Ulrik On Thu, 9 Mar 2017 at 16:51 Paul Bernal wrote:

[R] Unable to Load package Rcmdr after installation

2017-03-09 Thread Paul Bernal
Hello friends, Has anyone experienced trouble when trying to load package Rcmdr? It was working perfectly a couple of days ago, I don´t know why it isn´t working. > library("Rcmdr") Loading required package: splines Loading required package: RcmdrMisc Loading required package: car Loading

Re: [R-es] Asignación de objetos

2017-03-09 Thread Fernando Macedo
Creo que este link te puede servir: http://stackoverflow.com/questions/1741820/assignment-operators-in-r-and Fernando Macedo El 09/03/17 a las 05:57, Álvaro Díez Ansotegui escribió: Gracias José Antonio, Entiendo por lo tanto que se puede usar indistintamente y aconsejan utilizar “<-“ para

Re: [R] Why is merge sorting even when sort = F?

2017-03-09 Thread DIGHE, NILESH [AG/2362]
Using the "join" function from the plyr package preserves the data order library(plyr) join(grades2, info, by="grade", type="left", match="all") Nilesh -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Dimitri Liakhovitski Sent: Wednesday, March 08, 2017

[R] Antwort: Re: Approach for Storing Result Data

2017-03-09 Thread G . Maubach
Hi Gunter, Hi Jeff, Hi Readers, many thanks for your reply. My questions seems to be a little off topic cause it is not about using the programming language itself but how to use it in a analytics context. It is about processes and approaches of how to do things in R from a conception point

Re: [R-es] Asignación de objetos

2017-03-09 Thread Álvaro Díez Ansotegui
Gracias José Antonio, Entiendo por lo tanto que se puede usar indistintamente y aconsejan utilizar “<-“ para no llevar a un posible error. Gracias. Saludos!! Álvaro D. > El 9 mar 2017, a las 9:49, José Antonio Palazón Ferrando > escribió: > > Hola: > > Puedes considerar