Re: [R] findAssocs in TM package in R help?

2016-07-17 Thread Duncan Murdoch
On 17/07/2016 6:31 PM, Shivi Bhatia wrote: Hi Team, Please suggest. On Sun, Jul 17, 2016 at 2:55 AM, Shivi Bhatia wrote: Good Day, I am working on a text mining assignment and have built the document matrix using the tm package. We don't do homework here. You should ask your instructor f

Re: [R] means by year, month and day

2016-07-17 Thread jim holtman
Here is an example of using dplyr. Please provide a reasonable subset of data. Your was all for the same date. Use 'dput' to put in your email. > x <- read.table(text = " X.YY MM DD hh WDI R.WSP D.GST PRES ATMP DEWP + 2015 1 1 0 328 3.6 4.5 1028.0 3.8 -3.5 + 2015 1 1 1 3

Re: [R] Type III SS and collinearity in R

2016-07-17 Thread Fox, John
Dear Pamela, > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Pamela > Wong > Sent: Sunday, July 17, 2016 1:58 AM > To: r-help@r-project.org > Subject: [R] Type III SS and collinearity in R > > Hi there > It appears the Anova() function in the car pac

Re: [R] findAssocs in TM package in R help?

2016-07-17 Thread Shivi Bhatia
Hi Team, Please suggest. On Sun, Jul 17, 2016 at 2:55 AM, Shivi Bhatia wrote: > Good Day, > > I am working on a text mining assignment and have built the document > matrix using the tm package. > > Now I need to run findAssocs from my dtm with some word say 'like' with a > correlation of 0.70 b

Re: [R] means by year, month and day

2016-07-17 Thread Jianling Fan
Hello Tom, try aggregate() or cast(). Both works.I prefer the latter. library(reshape) desc<-melt(mydata, measure.vars=c("WDI","R.WSP", "D.GST", "PRES", "ATMP", "DEWP"), id.vars=c("X.YY","MM","DD")) summary<-cast(desc, X.YY+MM+DD~variable, mean) On 17 July 2016 at 06:22, Tom

[R] means by year, month and day

2016-07-17 Thread Tom Mosca
Hello Good Folk, My dataframe looks like this: > mydata X.YY MM DD hh WDI R.WSP D.GST PRES ATMP DEWP 12015 1 1 0 328 3.6 4.5 1028.0 3.8 -3.5 22015 1 1 1 300 2.1 2.7 1027.9 3.7 -4.4 32015 1 1 2 264 2.4 2.9 1027.7 3.6 -4.5 42015 1 1 3 230 4

[R] daily means, follow-up

2016-07-17 Thread Tom Mosca
Solved it myself: aggregate(mydata, by=mydata[c("MM","DD")], FUN=mean) Thank you. # - My dataframe looks like this: > mydata X.YY MM DD hh WDI R.WSP D.GST PRES ATMP DEWP 12015 1 1 0 328 3.6 4.5 102

[R] Type III SS and collinearity in R

2016-07-17 Thread Pamela Wong
Hi there It appears the Anova() function in the car package cannot compute type III SS when there is collinearity in the model. Has anyone else run into this problem? I would use drop1() to obtain the SS but it does not provide the intercept... __ R-he

Re: [R] Troubleshooting Type III SS and drop1()

2016-07-17 Thread Fox, John
Dear Pamela, It's very hard to tell from your message what you did, but I'm guessing that you passed the object produced by Anova() to drop1(). If this is in fact what you did, it makes no sense, because Anova() doesn't produce a linear-model object but rather takes such an object as its argume

Re: [R] Matrix

2016-07-17 Thread David Winsemius
> On Jul 16, 2016, at 7:43 PM, Ashta wrote: > > HI Denes, Duncan,Michael and all, > > Thank you very much for the helpful suggestion. Some of my data sets > were not square matrix, however, Denes's suggestion," > as.data.frame.table() ", handled that one. > `as.data.frame.table` should work

Re: [R] writing a matrix to a file with trailing zeroes

2016-07-17 Thread Duncan Murdoch
On 17/07/2016 11:33 AM, Erin Hodgess wrote: Hello everyone! I'm looking at this problem, and I'm sure there is a straightforward solution. I have a matrix and some of the values have zeroes to the right of the decimal point. When I write these to a file, the zeroes disappear. The material belo

[R] Solution to my own question

2016-07-17 Thread Erin Hodgess
write.table(format(x2,drop0trailing=FALSE),file="",col.name=FALSE,row.name =FALSE,quote=FALSE) -- Erin Hodgess Associate Professor Department of Mathematical and Statistics University of Houston - Downtown mailto: erinm.hodg...@gmail.com [[alternative HTML version deleted]]

[R] writing a matrix to a file with trailing zeroes

2016-07-17 Thread Erin Hodgess
Hello everyone! I'm looking at this problem, and I'm sure there is a straightforward solution. I have a matrix and some of the values have zeroes to the right of the decimal point. When I write these to a file, the zeroes disappear. The material below is what I have tried so far. > x2

Re: [R] newbee Caret load question

2016-07-17 Thread peter dalgaard
The R version was not stated (RStudio is a shell, so you cannot infer the version of R from its version number), but the warning messages suggest that it is less than 3.2.3. Recent versions of pbkrtest depend on R >= 3.2.3. I happen to know that because it led to infelicities which should probab