Re: [R] Aggregate counts of observations with times surrounding a time?

2017-05-16 Thread Jim Lemon
Hi again, Here is a version cleaned up a bit. Too tired to do it last night. mndf<-data.frame(st=seq(1483360938,by=1700,length=10), et=seq(1483362938,by=1700,length=10), store=c(rep("gap",5),rep("starbucks",5)), zip=c(94000,94000,94100,94100,94200,94000,94000,94100,94100,94200),

[R] Long vectors error using lar function in selectiveInference package

2017-05-16 Thread Adam Ralph Zeilinger
Hello, I'm trying to use the lar() and larInf() functions in the selectiveInference package to fit a least-angle regression model and calculate sequential p-values for the coefficients. However, I am getting a "long vectors error" when I run my data set through the lar() function: Error in

Re: [R] Extracting metadata information to corresponding dissimilarity matrix

2017-05-16 Thread David L Carlson
Fixing a typo in the original, adding a simplification, and using dissimilarity instead of similarity: set.seed(42) dta <- data.frame(ID=1:7, gender=sample(c("M", "F"), 7, replace=TRUE), age=sample.int(75, 7)) dsim <- dist(dta$age) # distance, already lower triangular dsim dta1 <- dta

Re: [R] violin plot help

2017-05-16 Thread Jeff Newmiller
Please use reply-all or equivalent to keep the list in the conversation. I don't do private online consultation. Your example suggested you did not know the difference, but your error suggests a completely different expression triggered the error, so all the more reason to give us an example

Re: [R] Extracting metadata information to corresponding dissimilarity matrix

2017-05-16 Thread David L Carlson
I think this is what you are trying to do. I've created a data set with 7 rows and a similarity matrix based on age: set.seed(42) dta <- data.frame(ID=1:7, gender=sample(c("M", "F"), 7, replace=TRUE), age=sample.int(75, 7)) sim <- max(dist(dta$age)) - dist(dta$age) # already lower

Re: [R] violin plot help

2017-05-16 Thread Jeff Newmiller
Read A) the Posting Guide (re plain text only... your emails may be damaged by the mailing list if you send html-formatted email... only you can solve this by figuring out how to use your email software) B) Help on assignment (?`=`) C) Help on logical tests (?`==`) -- Sent from my phone. Please

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
John: Sorry, but I do not understand what you have done. It seems like you hard coded the format I want, correct? Bruce John Kane wrote: Hi Bruce, We don't need all that code :) All that is required is the data.fame being used in the xtable command and the actual xtable commands. Below

[R] violin plot help

2017-05-16 Thread Abdelrahman, Omar (RER)
I am trying to produce multiple violin plots by 3 categorical variables, each violin representing 1 year worth of data. The variables are: Watershed (7 levels: county canals) Geography (5 levels: west; central; east; mouth; bay) Parameter (8 levels: water quality chemical parameters) Year (25

Re: [R] Extracting metadata information to corresponding dissimilarity matrix

2017-05-16 Thread Jeff Newmiller
Hello R Beginner... It is good that you are articulate, but R code has subtleties that words miss, so you really need to provide sample code and sample data to convey where you are. This is not necessarily easy, but it avoids a lot of us fixing the wrong problem and you might even solve your

[R] Alternative function for Dictionary ( )

2017-05-16 Thread Casimir, Patrick
All, Since the Dictionary () function is no longer available with the tm package. How do I use other functions to do the same as below? I want to capture a list of specific terms from a corpus. By example, if my corpus has 100 files. I want to see a list with occurrences of price, crude, oil

[R] Extracting metadata information to corresponding dissimilarity matrix

2017-05-16 Thread Rune Grønseth
Hi, I am R beginner. I've tried googling and reading, but this might be too simple to be found in the documentation. I have a dissimilarity index (symmetric matrix) from which I have extracted the unique values using the exodist package command "lower". There are 14 observations, so there are

[R] Dictionary not showing full list of trems with tm Package

2017-05-16 Thread Patrick Casimir
Hello Fellows, I want to use dictionary function to capture all specific terms from a corpus of 102 docs but the dictionary only captures those terms in 10 documents. I need those terms from all 102 docs. Any idea why? How do I get the dictionary to return for all 102 docs? See my coding

Re: [R] Xtable with long column headings/names

2017-05-16 Thread BR_email
John: Did not mean to take a short-cut, but I thought the code was not needed. Your follow-up is appreciated. Here's the code. I want the column headings to wrap around into two lines, not one long heading. Any help is greatly sought. Thanks. Bruce ~~ Response <- rbinom(50,1,0.2) yhat <-

Re: [R] Aggregate counts of observations with times surrounding a time?

2017-05-16 Thread Jim Lemon
Hi Mark, I think you might want something like this: mndf<-data.frame(st=seq(1483360938,by=1700,length=10), et=seq(1483362938,by=1700,length=10), store=c(rep("gap",5),rep("starbucks",5)), zip=c(94000,94000,94100,94100,94200,94000,94000,94100,94100,94200), store_id=seq(50,59)) # orders the

Re: [R] plot problems

2017-05-16 Thread peter dalgaard
> On 16 May 2017, at 02:05 , Duncan Murdoch wrote: > > On 15/05/2017 4:15 PM, sylvie.celer...@free.fr wrote: >> Hello all, >> I'm using RStudio Version 1.0.136 on wondow 7 (64 bite) and I can't >> understand why all my plots are displayed ouside of the Rstudio graphic