Re: [R] HTTP status was '404 Not Found'

2017-03-07 Thread Joshua Ulrich
On Tue, Mar 7, 2017 at 2:52 AM, Allan Tanaka wrote: > HiSo I tried running the p but i'm stuck as i get the following error: > In download.file(url, destfile, method = method, quiet = quiet) : cannot > open URL > 'http://chart.yahoo.com/table.csv?s=DJI&a=2&b=13&c=2012&d=2&e=07&f=2017&g=d&q=q&y=

[R] modify additional parameters, glht and summary

2017-03-07 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 messages

Re: [R] Any reason not to use RUnit any longer?

2017-03-07 Thread Hans-Peter Suter
Thanks a lot for the feedback, Dirk and Mehmet, My (large) test-code is in RUnit and so I'm glad to hear that it is fine. RUnit worked very well for me and I do not have a reason to switch. [[alternative HTML version deleted]] __ R-help@r-proje

Re: [R] About installing the lubridate package

2017-03-07 Thread Bert Gunter
Please go to: http://cran.r-project.org/ and start reading. In particular, how to download packages and other software. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County"

Re: [R] About installing the lubridate package

2017-03-07 Thread lily li
Thanks, Bert. This website is comprehensive. So for any kind of packages in the future, can I just download from this website? I did a search from google before. On Tue, Mar 7, 2017 at 12:14 PM, Bert Gunter wrote: > Huh? > > I just installed the Mavericks binary on my OSX Sierra without problems

Re: [R] About installing the lubridate package

2017-03-07 Thread Bert Gunter
Huh? I just installed the Mavericks binary on my OSX Sierra without problems: install.packages("lubridate", repos='https://cran.revolutionanalytics.com') A google search would have found this essentially instantly! As for native R functions for parsing dates: of course! ?strptime Again, a goo

Re: [R] About installing the lubridate package

2017-03-07 Thread lily li
Or if there is another way to get '', 'mm', and 'dd' from time variable 'dd-mm-'? Thanks very much. On Tue, Mar 7, 2017 at 11:45 AM, lily li wrote: > Hi R users, > > I'd like to ask that where to find the 'lubridate' package for Mac Sierra? > I downloaded one version for OS X Mavericks

[R] About installing the lubridate package

2017-03-07 Thread lily li
Hi R users, I'd like to ask that where to find the 'lubridate' package for Mac Sierra? I downloaded one version for OS X Mavericks binaries, but it does not work. The error message is as below: > install.packages("~/Downloads/lubridate_1.6.0.tar.gz", repos = NULL, type = "source") ERROR: dependen

Re: [R] Alternative to ggplot2 for R version 2.15.3

2017-03-07 Thread Jeff Newmiller
Lattice (comes with R). Is it really necessary for you you use such an antiquated version of R just because your computer is old? (I don't use Macs, but that is not necessarily so for other operating systems.) -- Sent from my phone. Please excuse my brevity. On March 7, 2017 3:12:48 AM PST, su

Re: [R] Earth Mover's Distance

2017-03-07 Thread Dirk Eddelbuettel
The earthmovdist repo on R-Forge is alive and well. Rainer and I simply stopped doing work on it as the authors of the Emd-L1 library we use could not get a liberal license for this. Note the language in the source code (src/emdL1.cpp) and please make sure YOUR use is in compliance. But as I us

Re: [R] Alternative to ggplot2 for R version 2.15.3

2017-03-07 Thread Duncan Murdoch
On 07/03/2017 6:12 AM, surendra jain wrote: Dear all, I have an old Macbook and I have installed R version 2.15.3. But ggplot2 is not available for this version of R. Can someone suggest me an alternative to ggplot2 (for plotting using R) for Mac version 10.5.8. You will automatically have

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

2017-03-07 Thread Lorenzo Isella
Dear Dominic, Thanks a lot for the quick reply. Just a few questions to make sure I got it all right (I now understand that transport and spatstat in particular can do much more than I need right now). Essentially I am after the Wasserstein distance between univariate distributions (and it would b

[R] Earth Mover's Distance

2017-03-07 Thread Lorenzo Isella
Dear All, From time to time I need to resort to the calculation of the earth mover' distance (see https://en.wikipedia.org/wiki/Earth_mover's_distance and https://en.wikipedia.org/wiki/Wasserstein_metric . In the past I used the package https://r-forge.r-project.org/projects/earthmovdist/ wh

[R] Earth Mover's Distance

2017-03-07 Thread Lorenzo Isella
Dear All, From time to time I need to resort to the calculation of the earth mover' distance (see https://en.wikipedia.org/wiki/Earth_mover's_distance and https://en.wikipedia.org/wiki/Wasserstein_metric . In the past I used the package https://r-forge.r-project.org/projects/earthmovdist/ wh

[R] Alternative to ggplot2 for R version 2.15.3

2017-03-07 Thread surendra jain
Dear all, I have an old Macbook and I have installed R version 2.15.3. But ggplot2 is not available for this version of R. Can someone suggest me an alternative to ggplot2 (for plotting using R) for Mac version 10.5.8. Best Regards, Surendra __ R-hel

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

2017-03-07 Thread Schuhmacher, Dominic
Dear Lorenzo, The code you have attached (if you replace 00 by 50) generates two sets of 50 points each that are uniformly distributed on the unit square [0,1]^2 and then computes the Wasserstein-1 distance between them assuming that each point has mass 1/50. Do the following to get a plot of t

Re: [R] Cannot create a visible Choropleth Legend - GISTools

2017-03-07 Thread Henry Cann
Apologies Bert, not sure I follow the question? The code is sort of pieced together from different thinks I've tried. Due to projection issues I've tried various different ways of carrying out a spatial join. Most of the code is based around making the join easier e.g by recreating unique identifie

[R] HTTP status was '404 Not Found'

2017-03-07 Thread Allan Tanaka
HiSo I tried running the p but i'm stuck as i get the following error:  In download.file(url, destfile, method = method, quiet = quiet) :  cannot open URL 'http://chart.yahoo.com/table.csv?s=DJI&a=2&b=13&c=2012&d=2&e=07&f=2017&g=d&q=q&y=0&z=DJI&x=.csv': HTTP status was '404 Not Found' Here is t

Re: [R] Matrix

2017-03-07 Thread David L Carlson
Change the "4" in embed(c(0*x[-1], x, 0*x[-1]), 4) to length(x) and it will generalize to other length vectors. This solution is not as compact, but it illustrates a relatively obscure R function: > x <- 1:4 > ncol <- length(x) > zeros <- rep(0, ncol - 1) > toeplitz(c(zeros, x, zeros))[-(1:(ncol

Re: [R] Cannot create a visible Choropleth Legend - GISTools

2017-03-07 Thread Bert Gunter
Did you look at the FAQ? -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Mar 7, 2017 at 1:35 AM, Henry Cann wrote: > Apologies Bert, not sure I fo

Re: [R] Any reason not to use RUnit any longer?

2017-03-07 Thread Dirk Eddelbuettel
On 6 March 2017 at 19:04, Hans-Peter Suter wrote: | I see that quite some packages nowadays use testthat and that RUnit doesn't | have recent updates. On the other hand Rccp, fTrading and others (still) | test with RUnit. RUnit is alive and well, look at https://cran.r-project.org/package=

[R] Problems installing devtools from github

2017-03-07 Thread Paul Bernal
Dear all, I was using R version 3.3.2 to install devtools and some other packages in order to create models and generate a web service that can be seen in the Microsoft Azure Machine Learning Studio environment. Now, since Azure works with CRAN R version 3.1.0, I decided to download this R versio

Re: [R] FOR TAKING PERCENTAGES of OTUS in each column (n=2910 COLUMNs)

2017-03-07 Thread David L Carlson
If you read your data into R, it is simple to compute the percentages. Use Save As in Excel to save your data as a .csv (comma separated variables) file. Then use read.csv() to create a data frame in R as Jim indicated. Put it in the default directory that R is using (this depends on what operat

Re: [R] Matrix

2017-03-07 Thread Gabor Grothendieck
Assuming that the input is x <- 1:4, try this one-liner: > embed(c(0*x[-1], x, 0*x[-1]), 4) [,1] [,2] [,3] [,4] [1,]1000 [2,]2100 [3,]3210 [4,]4321 [5,]0432 [6,]0043 [7,]0004 On Mo

Re: [R] FOR TAKING PERCENTAGES of OTUS in each column (n=2910 COLUMNs)

2017-03-07 Thread Jim Lemon
Hi Thilini, It is fairly simple in R once you have imported the data. Say you have a data frame obtained by exporting the Excel table to CSV and then importing it with "read.csv". I'm not sure whether you have a number in each cell or just a 0/1 absent/present value, but it may not matter. Assume t