[R] R version 3.2.5

2016-07-25 Thread Maria Alice Jacques
Good night,

How can I download and install R version 3.2.5 from cran mirror of
University of São Paulo, São Paulo?

Thanks for your support.

Maria Alice P. Jacques

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] about netcdf files

2016-07-25 Thread lily li
Hi all,

I have a problem in opening netcdf files. If one netcdf file contains
longitude, latitude, and daily precipitation. How to relate each
precipitation record to its associated location, and export them as csv
files? Thanks.

I just use nc_open(), ncvar_get(), but it is not very helpful. Thanks for
any ideas.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread David Winsemius

> On Jul 25, 2016, at 1:30 PM, Christofer Bogaso  
> wrote:
> 
> Just have tried this :
> 
> library(RCurl)
> x = postForm("https://www.amfiindia.com/net-asset-value/nav-history;,
> 'NAV Date' = "25-Jul-2016")
> 
> However doesnt look like I get valid data, because I still can get
> result for some future date as well!!
> 
> Any other option I should try?

This is not an R specific. It is simply reading HTML, XML, or JavaScript.

If you are unable to specify a particular set of values that delivers this 
during a human mediated interaction, then you should contact the owners of the 
webpage rather posting here. They have a "Contact Us" page.


-- 
David.


> 
> On Tue, Jul 26, 2016 at 1:53 AM, boB Rudis  wrote:
>> Valid parameters for the form would be super-helpful.
>> 
>> On Mon, Jul 25, 2016 at 3:52 PM, Ulrik Stervbo  
>> wrote:
>>> Hi Christofer,
>>> 
>>> If you can load all the data into R you don't need to query the website -
>>> you simply filter the data by your dates.
>>> 
>>> I think that's the easiest solution.
>>> 
>>> Best wishes,
>>> Ulrik
>>> 
>>> Christofer Bogaso  schrieb am Mo., 25. Juli
>>> 2016 21:30:
>>> 
 Hi Ulrik, Thanks for your reply. I am aware of that link and this is a
 good option. However with this approach, I can not get Data
 historically. I would like to create some TS in R for each MF there.
 
 Any other idea?
 
 Thanks,
 
 On Tue, Jul 26, 2016 at 12:53 AM, Ulrik Stervbo 
 wrote:
> The easiest might be to download the entire dataset and filter it
> appropriately. If I follow your link and press Download, I get the
 option to
> "Download Complete NAV Report in Text Format" and will result in this:
> http://portal.amfiindia.com/NAVReport.aspx?type=0
> 
> It is not the easiest format to get into R, and you might have to
> pre-process it.
> 
> Best,
> Ulrik
> 
> On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso <
 bogaso.christo...@gmail.com>
> wrote:
>> 
>> Hi again,
>> 
>> I am trying to find some way to download all data historically from
>> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
>> 
>> Basically what I am trying to do is, I shall have a range of dates and
>> for each date I need to download entire dataset programmatically.
>> 
>> Really appreciate if experts here help.
>> 
>> Thanks,
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
 
>>> 
>>>[[alternative HTML version deleted]]
>>> 
>>> __
>>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] glmmPQL crashes on inclusion of corSpatial object

2016-07-25 Thread Ben Bolker
Patrick Johann Schratz  gmail.com> writes:

> 
> Link to data:   
> (1170 obs, 9 variables, .Rd file) [plain link in case sth goes wrong 
> with the hyperlink: https://www.dropbox.com/s/yi3vf0bmqvydr8h/data.Rd?dl=0]
> 

 By the way, this has been cross-posted both to StackOverflow
and to r-sig-mixed-mod...@r-project.org. Cross-posting between
R lists is explicitly deprecated; cross-posting between R lists
and StackOverflow is not *explicitly* deprecated anywhere, but is
probably a bad idea (tends to waste the time of answerers who don't
know the question has been commented on and/or answered already
elsewhere).  Try to pick the single best venue and stick to it.

  Ben Bolker

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread Christofer Bogaso
Just have tried this :

library(RCurl)
x = postForm("https://www.amfiindia.com/net-asset-value/nav-history;,
'NAV Date' = "25-Jul-2016")

However doesnt look like I get valid data, because I still can get
result for some future date as well!!

Any other option I should try?

On Tue, Jul 26, 2016 at 1:53 AM, boB Rudis  wrote:
> Valid parameters for the form would be super-helpful.
>
> On Mon, Jul 25, 2016 at 3:52 PM, Ulrik Stervbo  
> wrote:
>> Hi Christofer,
>>
>> If you can load all the data into R you don't need to query the website -
>> you simply filter the data by your dates.
>>
>> I think that's the easiest solution.
>>
>> Best wishes,
>> Ulrik
>>
>> Christofer Bogaso  schrieb am Mo., 25. Juli
>> 2016 21:30:
>>
>>> Hi Ulrik, Thanks for your reply. I am aware of that link and this is a
>>> good option. However with this approach, I can not get Data
>>> historically. I would like to create some TS in R for each MF there.
>>>
>>> Any other idea?
>>>
>>> Thanks,
>>>
>>> On Tue, Jul 26, 2016 at 12:53 AM, Ulrik Stervbo 
>>> wrote:
>>> > The easiest might be to download the entire dataset and filter it
>>> > appropriately. If I follow your link and press Download, I get the
>>> option to
>>> > "Download Complete NAV Report in Text Format" and will result in this:
>>> > http://portal.amfiindia.com/NAVReport.aspx?type=0
>>> >
>>> > It is not the easiest format to get into R, and you might have to
>>> > pre-process it.
>>> >
>>> > Best,
>>> > Ulrik
>>> >
>>> > On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso <
>>> bogaso.christo...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Hi again,
>>> >>
>>> >> I am trying to find some way to download all data historically from
>>> >> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
>>> >>
>>> >> Basically what I am trying to do is, I shall have a range of dates and
>>> >> for each date I need to download entire dataset programmatically.
>>> >>
>>> >> Really appreciate if experts here help.
>>> >>
>>> >> Thanks,
>>> >>
>>> >> __
>>> >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>>> >> PLEASE do read the posting guide
>>> >> http://www.R-project.org/posting-guide.html
>>> >> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R-es] Duda sobre construccion de vectores

2016-07-25 Thread Francisco Rodríguez
Ok, muchas gracias, con vuestras soluciones resuelvo el problema, un saludo

To: c...@qualityexcellence.es; fjr...@hotmail.com
CC: r-help-es@r-project.org
From: javier.ruben.marcu...@gmail.com
Subject: RE: [R-es] Duda sobre construccion de vectores
Date: Mon, 25 Jul 2016 15:32:45 -0300

Estimado Francisco Hay una forma as.vector, por ejemplo (luego puedes usar como 
ya le suguieren): > x <-c(1,2,3,4)> y <-c(8,9,9,7)> z <- data.frame(x,y)> z  x 
y1 1 82 2 93 3 94 4 7> as.vector(z)  x y1 1 82 2 93 3 94 4 7> w <- 
as.vector(z)> w[1]  x1 12 23 34 4>  Javier Rub�n Marcuzzi De: Carlos Ortega
Enviado: lunes, 25 de julio de 2016 14:30
Para: Francisco Rodr�guez
CC: r-help-es@r-project.org
Asunto: Re: [R-es] Duda sobre construccion de vectores Hola Francisco, Esta es 
otra forma, > M[ as.matrix(data.frame(i = 1:length(index), j = index))][1] 4 7 
8 Saludos,Carlos Ortegawww.qualityexcellence.esEl 25 de julio de 2016, 
19:06, Francisco Rodr�guez escribi�: > Creo que me puede 
valer, muchas gracias Jorge, voy a probarlo y te cuento> > From: 
jorgeivanve...@gmail.com> Date: Mon, 25 Jul 2016 12:05:05 -0500> Subject: Re: 
[R-es] Duda sobre construccion de vectores> To: fjr...@hotmail.com> CC: 
r-help-es@r-project.org> > Buenas tardes, Francisco.> Quiz�s no sea la manera 
mas eficiente, pero proporciona el resultado que> buscas:> R> M <- 
matrix(c(2,3,3,4,5,6,7,7,8,11,10,5), nrow = 3, ncol = 4)R> index> <- c(2,3,3)R> 
sapply(1:NROW(M), function(.row) M[.row,][index[.row]])[1] 4> 7 8> 
Saludos,Jorge.-> > > > 2016-07-25 11:54 GMT-05:00 Francisco Rodr�guez 
:> Hola buenas tardes comunidad, seguro que hay algo f�cil, 
pero se me escapa> y es que estoy hoy algo torpe seguramente, a ver me gustar�a 
hacer lo> siguiente:> > Dada una matriz M (que puede ser muy grande), me 
gustaria crear un vector,> sin usar bucles (ya que cuando es muy grande, todo 
puede ser muy lento) del> siguiente modo.> > Para cada una de sus filas, me 
gustar�a seleccionar un �nico elemento de> una columna dada por otro vector, 
as� por ejemplo:> > -Si la matriz de partida es:> > M <- 
matrix(c(2,3,3,4,5,6,7,7,8,11,10,5), nrow = 3, ncol = 4)> > -As� pues se tiene 
que:> > M> >  [,1] [,2] [,3] [,4][1,]247   11[2,]35
7>  10[3,]3685> > -Y el vector indicador es:> > Indicador <- 
c(2,3,3)> > -Me gustar�a tener una nuevo vector, cuyos componentes fueran (si 
el> vector se llamase Resultado) los siguientes:> > Resultado{1} 4 7 8> > -Es 
decir ser�a la segunda componente del primer registro, la tercera> componente 
del segundo registro y la tercera componente del tercer registro> > -No 
recuerdo si se digo hace tiempo algo de con la librer�a data.table, me> da 
igual tener que usar cualquier librer�a, pero el tema es tratar de hacer> que 
sea una operaci�n vectorial que por ejemplo evite un bucle tal como:> > 
Resultado <- vector("numeric", 3)> > for (i in (1:3)){> > Resultado[i] = M[i, 
Indicador[i]]}> > -El cu�l, como he comentado ser�a lento si el n�mero de filas 
de matriz> fuese muy elevado> > Un saludo y muchas gracias> > 
[[alternative HTML version deleted]]> > > > > 
___> > R-help-es mailing list> > 
R-help-es@r-project.org> > https://stat.ethz.ch/mailman/listinfo/r-help-es> > > 
[[alternative HTML version deleted]]> > > 
___> R-help-es mailing list> 
R-help-es@r-project.org> https://stat.ethz.ch/mailman/listinfo/r-help-es>-- 
Saludos,Carlos Ortegawww.qualityexcellence.es [[alternative 
HTML version deleted]] ___R-help-es 
mailing 
listR-help-es@r-project.orghttps://stat.ethz.ch/mailman/listinfo/r-help-es  
  
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] probelm with xlab ylab and xaxp barplot

2016-07-25 Thread Abdoulaye SARR
Hi Marc,

According to your guidance the labels are almost at the right place when 
adjusting mar values.

A remaining need is to have the x axis at least for the two bottom figures as 
date from 1981 to 2005. Do you think this is doable. Ylim is fine but how tots 
in this case xlim.

Best regards,

asarr
Le 25 juil. 2016 à 14:28, Marc Schwartz  a écrit :

> Hi,
> 
> If your code below is a verbatim copy and paste, you still have the following 
> two lines active:
> 
>  par(mar=rep(2,4))
> 
> and
> 
>  op <- par(oma=c(1,2,3,5))
> 
> Comment out both of those lines and then see what the result looks like.
> 
> As I noted before, try the plot **without any modifications** to the default 
> margin values. Then adjust from there, which may require you to increase, not 
> decrease, the values from their defaults in order to have room for your text.
> 
> The values you have for par(mar) above, for example, reduce the values to 2 
> for each side from the default, which is:
> 
>  c(5, 4, 4, 2) + 0.1.
> 
> So that alone will likely result in there not being enough room for your axis 
> labels.
> 
> You may also have to create the barplot without any default annotation 
> created by the function itself and then add it with ?axis, ?text and ?mtext. 
> You may also have to reduce the size of the font itself, which is done via 
> the cex* arguments to barplot() and the additional annotation functions 
> mentioned in the prior sentence.
> 
> Regards,
> 
> Marc
> 
> 
>> On Jul 25, 2016, at 8:06 AM, Abdoulaye SARR  wrote:
>> 
>> 
 Hi Marc and Others,
>> 
>> 
>> I am still struggling to have my slab and ylab displayed on a bar plot. Marc 
>> did useful advise on playing with mar settings. I tried may combinations and 
>> can�t have it work.
>> 
>> I paste the code I am suing hoping guidance on solving this issue.
>> 
>> 
>> 
>> 
>> ## extract works for all time steps
>> d1<-read.nc(gp)
>> 
>> d2<-read.nc(er)
>> 
>> d3<-read.nc(me)
>> 
>> d4<-read.nc(ne)
>> 
>> d5<-read.nc(ar)
>> 
>> d6<-read.nc(cc)
>> 
>> d7<-read.nc(mr)
>> 
>> d8<-read.nc(ic)
>> 
>> z1<-d1$spei
>> z2<-d2$spei
>> z3<-d3$spei
>> z4<-d4$spei
>> z5<-d5$spei
>> z6<-d6$spei
>> z7<-d7$spei
>> z8<-d8$spei
>> #par(oma=c(2,2,2,2))  # all sides have 3 lines of space  
>> 
>> par(mar=rep(2,4))
>> #par(mar=c(5.1, 4.1, 2.1, 2.1))
>> #par(mai=c(1.02,0.82,0.82,0.42))
>> op <- par(oma=c(1,2,3,5))
>> #op <- par(oma=c(6,5,0,0))
>> par(mfrow=c(4,2))
>> 
>> line = 3
>> 
>> barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", xaxp=c(181,2005,1), 
>> col=ifelse(z1>0,"green","brown"))
>> 
>> mtext("a")
>> barplot(z2,xlab="Years", ylab="spei",  ylim=c(-2,2), 
>> col=ifelse(z2>0,"green","brown"))
>> mtext("b")
>> barplot(z3, ylim=c(-2,2), xlab="Years", ylab="spei", 
>> col=ifelse(z3>0,"green","brown"))
>> mtext("c")
>> barplot(z4, xlab="Years", ylab="spei", ylim=c(-2,2), 
>> col=ifelse(z4>0,"green","brown"))
>> mtext("d")
>> barplot(z5, xlab="Years", ylab="spei", ylim=c(-2,2), 
>> col=ifelse(z5>0,"green","brown"))
>> mtext("e")
>> barplot(z6, xlab="Years", ylab="spei", ylim=c(-2,2), 
>> col=ifelse(z6>0,"green","brown"))
>> mtext("f")
>> barplot(z7,xlab="Years", ylab="spei",  ylim=c(-2,2), 
>> col=ifelse(z7>0,"green","brown"))
>> mtext("g")
>> barplot(z8,  ylim=c(-2,2), xlab="Years", ylab="spei", 
>> col=ifelse(z8>0,"green","brown"))
>> mtext("h")
>> par(op)
>> 
>> Another solution with ggplot2 or lattice also welcome.
>> 
>> 
>> Best regards,
>> 
>> asarr
> 
> 


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] gcc error when configuring instillation

2016-07-25 Thread kulm
Hello,

I am currently trying to install R in my directory of a shared linux
server.  I have downloaded the most recent source code tarball,
uncompressed it, but hit errors when trying to enter the ./configure
command.  The main error appears to focus on gcc as one of lines states:
"checking whether the C compiler works... no".  When reading the log I see:
"gcc: error: unrecognized command line option '-V'" and "gcc: fatal error:
no input files".  I have checked and I have f77 and gfortran both within my
path, and the gcc version is 4.8.2.  When trying to ./configure with the
--disable-openmp command I recieve the same error.  I have attached the
config.log to the email.  If anyone has any suggestion I would be most
grateful.

Thank you very much,
Scott Kulm
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] brokerage function sna package raw.grp

2016-07-25 Thread Manon Ragonnet-Cronin



Dear all,

I am using the brokerage function in the sna package to look at  
liaisons between groups. The function returns raw and expected scores  
by vertex (raw.nli and exp.nli) and  the aggregate raw and expected  
scores (raw.gli and exp.gli). However, I am interested  in the scores  
for each group that I am studying  and only the *expected* scores per  
group (exp.grp) are given, not the raw scores by group. I thought  
maybe I'd be able to calculate the raw scores by sorting my vertices  
into groups and summing their raw scores within each group, but  
exp.grp does not seem to be the sum of exp.nli sorted by group.

I would be grateful for any help.

Thanks,
Manon Ragonnet,
Postdoctoral researcher, University of Edinburgh, UK.



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread boB Rudis
Valid parameters for the form would be super-helpful.

On Mon, Jul 25, 2016 at 3:52 PM, Ulrik Stervbo  wrote:
> Hi Christofer,
>
> If you can load all the data into R you don't need to query the website -
> you simply filter the data by your dates.
>
> I think that's the easiest solution.
>
> Best wishes,
> Ulrik
>
> Christofer Bogaso  schrieb am Mo., 25. Juli
> 2016 21:30:
>
>> Hi Ulrik, Thanks for your reply. I am aware of that link and this is a
>> good option. However with this approach, I can not get Data
>> historically. I would like to create some TS in R for each MF there.
>>
>> Any other idea?
>>
>> Thanks,
>>
>> On Tue, Jul 26, 2016 at 12:53 AM, Ulrik Stervbo 
>> wrote:
>> > The easiest might be to download the entire dataset and filter it
>> > appropriately. If I follow your link and press Download, I get the
>> option to
>> > "Download Complete NAV Report in Text Format" and will result in this:
>> > http://portal.amfiindia.com/NAVReport.aspx?type=0
>> >
>> > It is not the easiest format to get into R, and you might have to
>> > pre-process it.
>> >
>> > Best,
>> > Ulrik
>> >
>> > On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso <
>> bogaso.christo...@gmail.com>
>> > wrote:
>> >>
>> >> Hi again,
>> >>
>> >> I am trying to find some way to download all data historically from
>> >> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
>> >>
>> >> Basically what I am trying to do is, I shall have a range of dates and
>> >> for each date I need to download entire dataset programmatically.
>> >>
>> >> Really appreciate if experts here help.
>> >>
>> >> Thanks,
>> >>
>> >> __
>> >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> >> https://stat.ethz.ch/mailman/listinfo/r-help
>> >> PLEASE do read the posting guide
>> >> http://www.R-project.org/posting-guide.html
>> >> and provide commented, minimal, self-contained, reproducible code.
>>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread Ulrik Stervbo
Hi Christofer,

If you can load all the data into R you don't need to query the website -
you simply filter the data by your dates.

I think that's the easiest solution.

Best wishes,
Ulrik

Christofer Bogaso  schrieb am Mo., 25. Juli
2016 21:30:

> Hi Ulrik, Thanks for your reply. I am aware of that link and this is a
> good option. However with this approach, I can not get Data
> historically. I would like to create some TS in R for each MF there.
>
> Any other idea?
>
> Thanks,
>
> On Tue, Jul 26, 2016 at 12:53 AM, Ulrik Stervbo 
> wrote:
> > The easiest might be to download the entire dataset and filter it
> > appropriately. If I follow your link and press Download, I get the
> option to
> > "Download Complete NAV Report in Text Format" and will result in this:
> > http://portal.amfiindia.com/NAVReport.aspx?type=0
> >
> > It is not the easiest format to get into R, and you might have to
> > pre-process it.
> >
> > Best,
> > Ulrik
> >
> > On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso <
> bogaso.christo...@gmail.com>
> > wrote:
> >>
> >> Hi again,
> >>
> >> I am trying to find some way to download all data historically from
> >> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
> >>
> >> Basically what I am trying to do is, I shall have a range of dates and
> >> for each date I need to download entire dataset programmatically.
> >>
> >> Really appreciate if experts here help.
> >>
> >> Thanks,
> >>
> >> __
> >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> >> PLEASE do read the posting guide
> >> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread Christofer Bogaso
Hi Ulrik, Thanks for your reply. I am aware of that link and this is a
good option. However with this approach, I can not get Data
historically. I would like to create some TS in R for each MF there.

Any other idea?

Thanks,

On Tue, Jul 26, 2016 at 12:53 AM, Ulrik Stervbo  wrote:
> The easiest might be to download the entire dataset and filter it
> appropriately. If I follow your link and press Download, I get the option to
> "Download Complete NAV Report in Text Format" and will result in this:
> http://portal.amfiindia.com/NAVReport.aspx?type=0
>
> It is not the easiest format to get into R, and you might have to
> pre-process it.
>
> Best,
> Ulrik
>
> On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso 
> wrote:
>>
>> Hi again,
>>
>> I am trying to find some way to download all data historically from
>> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
>>
>> Basically what I am trying to do is, I shall have a range of dates and
>> for each date I need to download entire dataset programmatically.
>>
>> Really appreciate if experts here help.
>>
>> Thanks,
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Please assist me to download this data

2016-07-25 Thread Ulrik Stervbo
The easiest might be to download the entire dataset and filter it
appropriately. If I follow your link and press Download, I get the option
to "Download Complete NAV Report in Text Format" and will result in this:
http://portal.amfiindia.com/NAVReport.aspx?type=0

It is not the easiest format to get into R, and you might have to
pre-process it.

Best,
Ulrik

On Mon, 25 Jul 2016 at 20:37 Christofer Bogaso 
wrote:

> Hi again,
>
> I am trying to find some way to download all data historically from
> this website "https://www.amfiindia.com/net-asset-value/nav-history;.
>
> Basically what I am trying to do is, I shall have a range of dates and
> for each date I need to download entire dataset programmatically.
>
> Really appreciate if experts here help.
>
> Thanks,
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Please assist me to download this data

2016-07-25 Thread Christofer Bogaso
Hi again,

I am trying to find some way to download all data historically from
this website "https://www.amfiindia.com/net-asset-value/nav-history;.

Basically what I am trying to do is, I shall have a range of dates and
for each date I need to download entire dataset programmatically.

Really appreciate if experts here help.

Thanks,

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R-es] Duda sobre construccion de vectores

2016-07-25 Thread Javier Marcuzzi
Estimado Francisco

Hay una forma as.vector, por ejemplo (luego puedes usar como ya le suguieren):

> x <-c(1,2,3,4)
> y <-c(8,9,9,7)
> z <- data.frame(x,y)
> z
  x y
1 1 8
2 2 9
3 3 9
4 4 7
> as.vector(z)
  x y
1 1 8
2 2 9
3 3 9
4 4 7
> w <- as.vector(z)
> w[1]
  x
1 1
2 2
3 3
4 4
>

Javier Rubén Marcuzzi

De: Carlos Ortega
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] probelm with xlab ylab and xaxp barplot

2016-07-25 Thread Marc Schwartz
Hi,

First, I noted again that you still have:

   xaxp=c(181,2005,1)

in the first barplot() call. Get rid of that, as barplot() does not use normal 
axis ranges for the bar midpoints.

Second, I do not see an indication that you are using the 'names.arg' argument 
in barplot(), which supplies the vector of text to place below each bar. If 
this is correct, then you want the basic barplot() call to look something like:

  barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", 
  names.arg = 1981:2005,
  col=ifelse(z1>0,"green","brown"))

where names.arg on the second line is the vector of years from 1981 to 2005. If 
the data passed to barplot() have name attributes (for example, they are the 
result of using table() on a vector), those would be used, but I am guessing 
that your z* vectors are just numeric vectors without labels.

If you then need to further adjust the axes to make more room below the plots, 
adjust the first element of par(mar) until the default axes show.

For example: 

  par(mar = c(6, 4, 4, 2))

where 6 replaces the default 5 for the first element. You may need to go higher 
if the text is still not showing. If need be, increase it further slowly to 
view the impact. You can also change by less than a full integer (e.g. 5.5, 
6.25, etc.) as you may need. At some point, you will overshoot with too much 
room and you can then back down slowly.

Using this approach, each plot will have a similar size as you adjust the 
margins and then look similar visually, presuming that the axis ranges are the 
same for each.

Regards,

Marc


> On Jul 25, 2016, at 11:56 AM, Abdoulaye SARR  wrote:
> 
> Hi Marc,
> 
> According to your guidance the labels are almost at the right place when 
> adjusting mar values.
> 
> A remaining need is to have the x axis at least for the two bottom figures as 
> date from 1981 to 2005. Do you think this is doable. Ylim is fine but how 
> tots in this case xlim.
> 
> Best regards,
> 
> asarr
> Le 25 juil. 2016 à 14:28, Marc Schwartz  a écrit :
> 
>> Hi,
>> 
>> If your code below is a verbatim copy and paste, you still have the 
>> following two lines active:
>> 
>>  par(mar=rep(2,4))
>> 
>> and
>> 
>>  op <- par(oma=c(1,2,3,5))
>> 
>> Comment out both of those lines and then see what the result looks like.
>> 
>> As I noted before, try the plot **without any modifications** to the default 
>> margin values. Then adjust from there, which may require you to increase, 
>> not decrease, the values from their defaults in order to have room for your 
>> text.
>> 
>> The values you have for par(mar) above, for example, reduce the values to 2 
>> for each side from the default, which is:
>> 
>>  c(5, 4, 4, 2) + 0.1.
>> 
>> So that alone will likely result in there not being enough room for your 
>> axis labels.
>> 
>> You may also have to create the barplot without any default annotation 
>> created by the function itself and then add it with ?axis, ?text and ?mtext. 
>> You may also have to reduce the size of the font itself, which is done via 
>> the cex* arguments to barplot() and the additional annotation functions 
>> mentioned in the prior sentence.
>> 
>> Regards,
>> 
>> Marc
>> 
>> 
>>> On Jul 25, 2016, at 8:06 AM, Abdoulaye SARR  wrote:
>>> 
>>> 
> Hi Marc and Others,
>>> 
>>> 
>>> I am still struggling to have my slab and ylab displayed on a bar plot. 
>>> Marc did useful advise on playing with mar settings. I tried may 
>>> combinations and can�t have it work.
>>> 
>>> I paste the code I am suing hoping guidance on solving this issue.
>>> 
>>> 
>>> 
>>> 
>>> ## extract works for all time steps
>>> d1<-read.nc(gp)
>>> 
>>> d2<-read.nc(er)
>>> 
>>> d3<-read.nc(me)
>>> 
>>> d4<-read.nc(ne)
>>> 
>>> d5<-read.nc(ar)
>>> 
>>> d6<-read.nc(cc)
>>> 
>>> d7<-read.nc(mr)
>>> 
>>> d8<-read.nc(ic)
>>> 
>>> z1<-d1$spei
>>> z2<-d2$spei
>>> z3<-d3$spei
>>> z4<-d4$spei
>>> z5<-d5$spei
>>> z6<-d6$spei
>>> z7<-d7$spei
>>> z8<-d8$spei
>>> #par(oma=c(2,2,2,2))  # all sides have 3 lines of space  
>>> 
>>> par(mar=rep(2,4))
>>> #par(mar=c(5.1, 4.1, 2.1, 2.1))
>>> #par(mai=c(1.02,0.82,0.82,0.42))
>>> op <- par(oma=c(1,2,3,5))
>>> #op <- par(oma=c(6,5,0,0))
>>> par(mfrow=c(4,2))
>>> 
>>> line = 3
>>> 
>>> barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", xaxp=c(181,2005,1), 
>>> col=ifelse(z1>0,"green","brown"))
>>> 
>>> mtext("a")
>>> barplot(z2,xlab="Years", ylab="spei",  ylim=c(-2,2), 
>>> col=ifelse(z2>0,"green","brown"))
>>> mtext("b")
>>> barplot(z3, ylim=c(-2,2), xlab="Years", ylab="spei", 
>>> col=ifelse(z3>0,"green","brown"))
>>> mtext("c")
>>> barplot(z4, xlab="Years", ylab="spei", ylim=c(-2,2), 
>>> col=ifelse(z4>0,"green","brown"))
>>> mtext("d")
>>> barplot(z5, xlab="Years", ylab="spei", ylim=c(-2,2), 
>>> col=ifelse(z5>0,"green","brown"))
>>> mtext("e")
>>> barplot(z6, xlab="Years", ylab="spei", ylim=c(-2,2), 
>>> col=ifelse(z6>0,"green","brown"))
>>> mtext("f")
>>> 

Re: [R-es] Duda sobre construccion de vectores

2016-07-25 Thread Carlos Ortega
Hola Francisco,

Esta es otra forma,

> M[ as.matrix(data.frame(i = 1:length(index), j = index))]
[1] 4 7 8

Saludos,
Carlos Ortega
www.qualityexcellence.es




El 25 de julio de 2016, 19:06, Francisco Rodríguez 
escribió:

> Creo que me puede valer, muchas gracias Jorge, voy a probarlo y te cuento
>
> From: jorgeivanve...@gmail.com
> Date: Mon, 25 Jul 2016 12:05:05 -0500
> Subject: Re: [R-es] Duda sobre construccion de vectores
> To: fjr...@hotmail.com
> CC: r-help-es@r-project.org
>
> Buenas tardes, Francisco.
> Quizás no sea la manera mas eficiente, pero proporciona el resultado que
> buscas:
> R> M <- matrix(c(2,3,3,4,5,6,7,7,8,11,10,5), nrow = 3, ncol = 4)R> index
> <- c(2,3,3)R> sapply(1:NROW(M), function(.row) M[.row,][index[.row]])[1] 4
> 7 8
> Saludos,Jorge.-
>
>
>
> 2016-07-25 11:54 GMT-05:00 Francisco Rodríguez :
> Hola buenas tardes comunidad, seguro que hay algo fácil, pero se me escapa
> y es que estoy hoy algo torpe seguramente, a ver me gustaría hacer lo
> siguiente:
>
> Dada una matriz M (que puede ser muy grande), me gustaria crear un vector,
> sin usar bucles (ya que cuando es muy grande, todo puede ser muy lento) del
> siguiente modo.
>
> Para cada una de sus filas, me gustaría seleccionar un único elemento de
> una columna dada por otro vector, así por ejemplo:
>
> -Si la matriz de partida es:
>
> M <- matrix(c(2,3,3,4,5,6,7,7,8,11,10,5), nrow = 3, ncol = 4)
>
> -Así pues se tiene que:
>
> M
>
>  [,1] [,2] [,3] [,4][1,]247   11[2,]357
>  10[3,]3685
>
> -Y el vector indicador es:
>
> Indicador <- c(2,3,3)
>
> -Me gustaría tener una nuevo vector, cuyos componentes fueran (si el
> vector se llamase Resultado) los siguientes:
>
> Resultado{1} 4 7 8
>
> -Es decir sería la segunda componente del primer registro, la tercera
> componente del segundo registro y la tercera componente del tercer registro
>
> -No recuerdo si se digo hace tiempo algo de con la librería data.table, me
> da igual tener que usar cualquier librería, pero el tema es tratar de hacer
> que sea una operación vectorial que por ejemplo evite un bucle tal como:
>
> Resultado <- vector("numeric", 3)
>
> for (i in (1:3)){
>
> Resultado[i] = M[i, Indicador[i]]}
>
> -El cuál, como he comentado sería lento si el número de filas de matriz
> fuese muy elevado
>
> Un saludo y muchas gracias
>
> [[alternative HTML version deleted]]
>
>
>
>
> ___
>
> R-help-es mailing list
>
> R-help-es@r-project.org
>
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>
>
> [[alternative HTML version deleted]]
>
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>



-- 
Saludos,
Carlos Ortega
www.qualityexcellence.es

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R-es] Duda sobre construccion de vectores

2016-07-25 Thread Francisco Rodríguez
Hola buenas tardes comunidad, seguro que hay algo f�cil, pero se me escapa y es 
que estoy hoy algo torpe seguramente, a ver me gustar�a hacer lo siguiente:
Dada una matriz M (que puede ser muy grande), me gustaria crear un vector, sin 
usar bucles (ya que cuando es muy grande, todo puede ser muy lento) del 
siguiente modo.
Para cada una de sus filas, me gustar�a seleccionar un �nico elemento de una 
columna dada por otro vector, as� por ejemplo:
-Si la matriz de partida es:
M <- matrix(c(2,3,3,4,5,6,7,7,8,11,10,5), nrow = 3, ncol = 4)
-As� pues se tiene que:
M
 [,1] [,2] [,3] [,4][1,]247   11[2,]357   10[3,]
3685
-Y el vector indicador es:
Indicador <- c(2,3,3)
-Me gustar�a tener una nuevo vector, cuyos componentes fueran (si el vector se 
llamase Resultado) los siguientes:
Resultado{1} 4 7 8
-Es decir ser�a la segunda componente del primer registro, la tercera 
componente del segundo registro y la tercera componente del tercer registro
-No recuerdo si se digo hace tiempo algo de con la librer�a data.table, me da 
igual tener que usar cualquier librer�a, pero el tema es tratar de hacer que 
sea una operaci�n vectorial que por ejemplo evite un bucle tal como:
Resultado <- vector("numeric", 3)
for (i in (1:3)){
Resultado[i] = M[i, Indicador[i]]}
-El cu�l, como he comentado ser�a lento si el n�mero de filas de matriz fuese 
muy elevado
Un saludo y muchas gracias
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] adding a data point on a boxplot

2016-07-25 Thread David Winsemius

> On Jul 25, 2016, at 3:20 AM, Pierre Micallef  
> wrote:
> 
> Hi
> 
> 
> Please could somebody offer some assistance with the following problem?
> 
> I am trying to use the boxplot function. As standard it displays (min, lower 
> Q, median, Upper Q and Max). For each dotplot I would also like to add the 
> current/most recent value from my data series as a data point. The goal being 
> to graphically show where current values are compared to the above standard 
> statistics.
> 
> I have removed the date columns from the data but it should be in descending 
> order i.e. the last data point in each series should be the current value.
> 
> Happy for someone to amend the whole code if there is a smarter way of doing 
> it.
> 
> Thanks for any help you can give with this.
> 
> See code below:
> 
> blpConnect()
> 
> 
> data<-data.frame(LargeValue=bdh("DJUSVL Index", c("PX_LAST"), 
> start.date=Sys.Date()-252*5),
> LargeGrowth=bdh("DJUSGL Index", c("PX_LAST"), 
> start.date=Sys.Date()-252*5))
> data <- data[,!names(data) %in% c("LargeValue.date","LargeGrowth.date")]
> boxplot(data, las = 2, names = c("Large Value"," Large Growth"), col = 
> c("red","royalblue2"),main=toupper("Box Plot Value vs Growth"), Xlab="Index 
> Level", range = 0, horizontal=TRUE)
> 
> 
This should be very easy. (I'm not reviewing your code since it is obviously 
not reproducible yet. Presumably you would want to use tail( vectname, 1) to 
get the last point.)  

To plot a large red "point" (actually a circle) at 0 in the first "column" of 
the first example on the ?boxplot page, you would issue:

points(1, 0, cex=5, col="red")

-- 

David.


> 
> Thanks
> Pierre
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] probelm with xlab ylab and xaxp barplot

2016-07-25 Thread Marc Schwartz
Hi,

If your code below is a verbatim copy and paste, you still have the following 
two lines active:

  par(mar=rep(2,4))

and

  op <- par(oma=c(1,2,3,5))

Comment out both of those lines and then see what the result looks like.

As I noted before, try the plot **without any modifications** to the default 
margin values. Then adjust from there, which may require you to increase, not 
decrease, the values from their defaults in order to have room for your text.

The values you have for par(mar) above, for example, reduce the values to 2 for 
each side from the default, which is:

  c(5, 4, 4, 2) + 0.1.

So that alone will likely result in there not being enough room for your axis 
labels.

You may also have to create the barplot without any default annotation created 
by the function itself and then add it with ?axis, ?text and ?mtext. You may 
also have to reduce the size of the font itself, which is done via the cex* 
arguments to barplot() and the additional annotation functions mentioned in the 
prior sentence.

Regards,

Marc


> On Jul 25, 2016, at 8:06 AM, Abdoulaye SARR  wrote:
> 
> 
>>> Hi Marc and Others,
> 
> 
> I am still struggling to have my slab and ylab displayed on a bar plot. Marc 
> did useful advise on playing with mar settings. I tried may combinations and 
> can�t have it work.
> 
> I paste the code I am suing hoping guidance on solving this issue.
> 
> 
> 
> 
> ## extract works for all time steps
> d1<-read.nc(gp)
> 
> d2<-read.nc(er)
> 
> d3<-read.nc(me)
> 
> d4<-read.nc(ne)
> 
> d5<-read.nc(ar)
> 
> d6<-read.nc(cc)
> 
> d7<-read.nc(mr)
> 
> d8<-read.nc(ic)
> 
> z1<-d1$spei
> z2<-d2$spei
> z3<-d3$spei
> z4<-d4$spei
> z5<-d5$spei
> z6<-d6$spei
> z7<-d7$spei
> z8<-d8$spei
> #par(oma=c(2,2,2,2))  # all sides have 3 lines of space  
> 
> par(mar=rep(2,4))
> #par(mar=c(5.1, 4.1, 2.1, 2.1))
> #par(mai=c(1.02,0.82,0.82,0.42))
> op <- par(oma=c(1,2,3,5))
> #op <- par(oma=c(6,5,0,0))
> par(mfrow=c(4,2))
> 
> line = 3
> 
> barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", xaxp=c(181,2005,1), 
> col=ifelse(z1>0,"green","brown"))
> 
> mtext("a")
> barplot(z2,xlab="Years", ylab="spei",  ylim=c(-2,2), 
> col=ifelse(z2>0,"green","brown"))
> mtext("b")
> barplot(z3, ylim=c(-2,2), xlab="Years", ylab="spei", 
> col=ifelse(z3>0,"green","brown"))
> mtext("c")
> barplot(z4, xlab="Years", ylab="spei", ylim=c(-2,2), 
> col=ifelse(z4>0,"green","brown"))
> mtext("d")
> barplot(z5, xlab="Years", ylab="spei", ylim=c(-2,2), 
> col=ifelse(z5>0,"green","brown"))
> mtext("e")
> barplot(z6, xlab="Years", ylab="spei", ylim=c(-2,2), 
> col=ifelse(z6>0,"green","brown"))
> mtext("f")
> barplot(z7,xlab="Years", ylab="spei",  ylim=c(-2,2), 
> col=ifelse(z7>0,"green","brown"))
> mtext("g")
> barplot(z8,  ylim=c(-2,2), xlab="Years", ylab="spei", 
> col=ifelse(z8>0,"green","brown"))
> mtext("h")
> par(op)
> 
> Another solution with ggplot2 or lattice also welcome.
> 
> 
> Best regards,
> 
> asarr



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

[R] Windows 10 Application Compatibility Check | FreeWare R Statistical Environment v3.2.2

2016-07-25 Thread Ramar, Rohini
Hello Team,

We are, Citi Application Readiness Team, need your assistance in order to 
gather info about below application compatibility and support for Win 10 as 
part of Window 10 Readiness initiative. CITI Bank has been using below 
"FreeWare R Statistical Environment v3.2.2"  software products currently on Win 
7 operating system.

We would like to know whether the below listed application is compatible and 
supported even for Win 10 (64 Bit) or is there any other higher version of 
application which would be compatible for Win10. If you have not tested for Win 
10, could you please provide us with a tentative date by when we can reach you.

Application Name : FreeWare R Statistical Environment v3.2.2


Note: Kindly re-direct this email to appropriate team if we reached you wrongly.


Regards,
Rohini R
Citi Architecture & Technology Engineering
Client Computing
Direct Phone #:+91 22 3346 1497
Email ID: rohini.ra...@citi.com



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] probelm with xlab ylab and xaxp barplot

2016-07-25 Thread Abdoulaye SARR

>> Hi Marc and Others,


I am still struggling to have my slab and ylab displayed on a bar plot. Marc 
did useful advise on playing with mar settings. I tried may combinations and 
can�t have it work.

I paste the code I am suing hoping guidance on solving this issue.




## extract works for all time steps
d1<-read.nc(gp)

d2<-read.nc(er)

d3<-read.nc(me)

d4<-read.nc(ne)

d5<-read.nc(ar)

d6<-read.nc(cc)

d7<-read.nc(mr)

d8<-read.nc(ic)

z1<-d1$spei
z2<-d2$spei
z3<-d3$spei
z4<-d4$spei
z5<-d5$spei
z6<-d6$spei
z7<-d7$spei
z8<-d8$spei
#par(oma=c(2,2,2,2))  # all sides have 3 lines of space  

par(mar=rep(2,4))
#par(mar=c(5.1, 4.1, 2.1, 2.1))
#par(mai=c(1.02,0.82,0.82,0.42))
op <- par(oma=c(1,2,3,5))
#op <- par(oma=c(6,5,0,0))
par(mfrow=c(4,2))

line = 3

barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", xaxp=c(181,2005,1), 
col=ifelse(z1>0,"green","brown"))

mtext("a")
barplot(z2,xlab="Years", ylab="spei",  ylim=c(-2,2), 
col=ifelse(z2>0,"green","brown"))
mtext("b")
barplot(z3, ylim=c(-2,2), xlab="Years", ylab="spei", 
col=ifelse(z3>0,"green","brown"))
mtext("c")
barplot(z4, xlab="Years", ylab="spei", ylim=c(-2,2), 
col=ifelse(z4>0,"green","brown"))
mtext("d")
barplot(z5, xlab="Years", ylab="spei", ylim=c(-2,2), 
col=ifelse(z5>0,"green","brown"))
mtext("e")
barplot(z6, xlab="Years", ylab="spei", ylim=c(-2,2), 
col=ifelse(z6>0,"green","brown"))
mtext("f")
barplot(z7,xlab="Years", ylab="spei",  ylim=c(-2,2), 
col=ifelse(z7>0,"green","brown"))
mtext("g")
barplot(z8,  ylim=c(-2,2), xlab="Years", ylab="spei", 
col=ifelse(z8>0,"green","brown"))
mtext("h")
par(op)

Another solution with ggplot2 or lattice also welcome.


Best regards,

asarr
>> 
>> 
>> On Wed, Jul 20, 2016 at 6:03 PM, Marc Schwartz  wrote:
>> 
>> > On Jul 20, 2016, at 4:00 AM, Abdoulaye SARR  wrote:
>> >
>> > I have the color of my bar plot displayed correctly but don�t have xlab,  
>> > ylab  and xaxp don�t show up.
>> >
>> > here is example of yearly data (25 years 1981-2005)
>> >> head(z1)
>> > [1] -0.1001726  0.2014272 -0.8556950  0.1920669 -0.8013520  1.3324949
>> >
>> > code to display values
>> >
>> > par(mar=rep(2,4))
>> > op <- par(oma=c(5,7,1,1))
>> > par(mfrow=c(4,2))
>> >
>> > line = 3
>> >
>> > barplot(z1, ylim=c(-2,2), xlab="Years", ylab="spei", xaxp=c(181,2005,1), 
>> > col=ifelse(z1>0,"green","brown �))
>> >
>> > hoe help on this issue
>> >
>> > Fipou
>> 
>> 
>> Hi,
>> 
>> First, a general comment, which is that barplots are typically good for 
>> displaying counts and percentages, not continuous data points or perhaps 
>> estimates of means, etc. Your values for z1 above, suggest that you might be 
>> better off just plotting the points on the y axis against the years on the x 
>> axis. That is, for example:
>> 
>>   plot(1981:2005, z1, col = ifelse(z1 > 0, "green", "brown"),
>>ylab = "spei", xlab = "Years", pch = 19)
>> 
>> presuming that z1 has 25 values.
>> 
>> That being said, some additional notes to hopefully guide you here with 
>> barplot():
>> 
>> 1. You appear to be wanting to plot a matrix of 8 plots in a 4 row by 2 
>> column matrix. That is fine, but note that changing the graphic parameters 
>> associated with the spacing of margins, etc. in a matrix don't always 
>> provide a result similar to what you might find in a single plot. I would 
>> start by not adjusting par(mar) and par(oma) from their default values to 
>> get an idea of what the plot looks like with default settings and then 
>> modify from there so that you can see how any adjustments affect the result. 
>> You may be adjusting the margins for each plot and the outer margins of the 
>> overall matrix in a manner that conflicts.
>> 
>> 
>> 2. In the case of a vertical barplot, the bars are not centered around 
>> integer values on the x axis, as they would be in say a boxplot. In the help 
>> for barplot() you will note that the Value section indicates that barplot 
>> returns a vector (by default) of the bar midpoints, which can then be used 
>> for annotation on the relevant axis. There are examples of the use of this 
>> on the barplot help page. Your values for 'xaxp' (which presumably has a 
>> typo for 1981, as 181) will not be correct here. Thus:
>> 
>>   MP <- barplot(z1, ...)
>> 
>> where 'MP' will contain the individual bar midpoints and then you can use 
>> code like:
>> 
>>   axis(1, at = MP, labels = 1981:2005, ...)
>> 
>> to place annotations below each bar. See ?axis as well as ?mtext for 
>> additional information on plot annotations.
>> 
>> Another option is to use the names.arg argument in barplot, to provide the 
>> names for each bar:
>> 
>>   barplot(z1, names.arg = 1981:2005, ...)
>> 
>> You will also likely have to adjust the font sizes for text spacing, as the 
>> defaults may be too large for all labels to display given the large number 
>> of bars. The cex* family of graphic parameters can be helpful. See the 
>> arguments in ?barplot and in ?par for more information.

Re: [R] Soft Question: Where to find this reference.

2016-07-25 Thread Oscar Moreno
See book: Statistical Models in S (ISBN-10: 041283040X; ISBN-13: 
978-0412830402) Chapter 5, p. 145. 

• Analysis of Variance; Designed Experiments, J. M. Chambers, A. E. Freeny and 
R. M. Heiberger, Statistical Models in S, J. M. Chambers and T. J. Hastie 
(editors), Wadsworth & Brooks/Cole, Pacific Grove, California, 1992.

> On Jul 25, 2016, at 06:48, Justin Thong  wrote:
> 
> I notice a lot of r documentation refer to this reference below. I can't
> seem to find it anywhere.
> Does anyone have a link to point to where I can either view it or buy it?
> 
> 
> *Chambers, J. M., Freeny, A and Heiberger, R. M. (1992) Analysis of
> variance; designed experiments*
> 
> -- 
> Yours sincerely,
> Justin
> 
> *I check my email at 9AM and 4PM everyday*
> *If you have an EMERGENCY, contact me at +447938674419(UK) or
> +60125056192(Malaysia)*
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R-es] Vision por computador

2016-07-25 Thread Javier Marcuzzi
Estimado Carlos Agüero

Opencv es c++, tiene una cantidad de filtros como ser pasar la imagen a escala 
de grises, cambiar el contraste, etc. Luego hace un reconocimiento de patrones 
con redes neuronales.

Si quieres aprender la parte informática de como se escribe el algoritmo para 
utilizar luego en el reconocimiento de imágenes, puede ser que R sea útil, pero 
si quiere reconocer imágenes hasta donde yo se lo importante es el 
entrenamiento, es decir varios filtros con los valores correctos que ingresan a 
la red neuronal y como resultado compara los patrones y reconoce o no una 
imagen. Para eso hay que encontrar un software que facilite, por ejemplo ir 
cambiando la saturación y ver en pantalla el cambio en la imagen, luego otro 
filtro y ver en pantalla el cambio de ambos, una vez finalizado obtener los 
filtros y valores para poder usarlos en la red neuronal y realizar el 
reconocimiento.

Para esto una empresa ofrece un software para open cv, pero la versión libre no 
guarda y la comercial ni siquiera tiene el precio publicado.

Hay una forma con r-opencv, pero nunca la exploré, si encuentras algo por 
ejemplo yo tomo 10 imágenes de bicicletas, las entreno (viendo visualmente los 
parámetros), y puedo reconocer las imágenes, avisa.

Javier Rubén Marcuzzi

De: Carlos Ortega
[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R] Country names from latitude and longitude

2016-07-25 Thread Miluji Sb
I have the following data at 0.5 degree by 0.5 degree.

temp <- dput(head(ptsDF,10))
structure(list(longitude = c(-68.25, -67.75, -67.25, -68.25,
-67.75, -67.25, -71.25, -70.75, -69.25, -68.75), latitude = c(-54.75,
-54.75, -54.75, -54.25, -54.25, -54.25, -53.75, -53.75, -53.75,
-53.75), GDP = c(1.683046, 0.3212307, 0.0486207, 0.1223268, 0.0171909,
0.0062104, 0.22379, 0.1406729, 0.0030038, 0.0057422)), .Names =
c("longitude",
"latitude", "GDP"), row.names = c(4L, 17L, 30L, 43L, 56L, 69L,
82L, 95L, 108L, 121L), class = "data.frame")

I would like add the corresponding country names to each of the
coordinates. This is what I have done:

library(data.table)
library(rgdal)
library(reshape2)
library(dplyr)
library(tidyr)
library(lubridate)
library(maps)
library(countrycode)
library(ggplot2)
library(raster)

coord_cells <-temp [,c(1,2)]
pts_cells <-
SpatialPoints(coord_cells,proj4string=CRS(proj4string(worldmap)))
indices_cells <- over(pts_cells, worldmap,na.rm=TRUE)
foo_cells<-indices_cells[,c(3,5)] # Keep ISO3 and country names only
new_data <- cbind(foo_cells, temp)

However, I get a large number of NAs for coordinates which should have
corresponding countries. What am I doing wrong? Any suggestions? Thank you.

Sincerely,

Milu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Soft Question: Where to find this reference.

2016-07-25 Thread Duncan Murdoch

On 25/07/2016 6:48 AM, Justin Thong wrote:

I notice a lot of r documentation refer to this reference below. I can't
seem to find it anywhere.
Does anyone have a link to point to where I can either view it or buy it?


*Chambers, J. M., Freeny, A and Heiberger, R. M. (1992) Analysis of
variance; designed experiments*



The complete versions of that reference say where:  "Chapter 5 of 
\emph{Statistical Models in S}

  eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole."

Academic libraries are likely to have copies of that book.  You can also 
buy copies on Amazon.  Google Books can give details.  The ISBN is 
0534167640.


Duncan Murdoch

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Soft Question: Where to find this reference.

2016-07-25 Thread Justin Thong
I notice a lot of r documentation refer to this reference below. I can't
seem to find it anywhere.
Does anyone have a link to point to where I can either view it or buy it?


*Chambers, J. M., Freeny, A and Heiberger, R. M. (1992) Analysis of
variance; designed experiments*

-- 
Yours sincerely,
Justin

*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+60125056192(Malaysia)*

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Estimators for non-normal data

2016-07-25 Thread Martin Maechler
> Nika Sušac 
> on Sat, 23 Jul 2016 19:39:48 +0200 writes:

> Hi!  I have non-normal data (items are continuous on a
> 9-point scale, but not normally distributed) and I want to
> conduct cfa. Which of the estimators available in lavaan
> do you recommend me to use?  Thanks in advance!

I think you want *robust* statistical methods then.

Robust factor analysis (if 'cfa' means something like that) is
somewhat prominent topic.
Simple approaches will already be available by using
MASS::cov.rob() for a robust covariance matrix which you then
can pass to other methods.

For more (and more modern) methods and approaches,

- for R packages, I'd recommend you consult the CRAN task view
  about robust statistical methods,
https://cran.r-project.org/web/views/Robust.html
  notably the section on 'Multivariate Analysis'

- for more specific help and expertise, I strongly recommend
  the dedicated  R-SIG-robust mailing list (instead of R-help),
   --> https://stat.ethz.ch/mailman/listinfo/r-sig-robust

Best regards,
Martin Maechler, ETH Zurich

>   [[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Interpreting error message probably caused by directlabels

2016-07-25 Thread Loris Bennett
Dear all,

Possibly as a result of an update to R 3.3.0, a script which I had been
running regularly via cron, the following line

  p_named <- p_anon + geom_dl(aes(label=user,colour=user),
  list("top.points",
  cex = 0.5, rot = -45, hjust = 1))
now produces the error:

  Error in ggplot2::layer(data = data, mapping = mapping, geom = GeomDl,  : 
must specify method= argument

Given that I don't call ggplot2::layer directly and given that
?ggplot2::layer doesn't contain any reference to an argument 'method',
what is the interpretation of this error message?

Aside from understanding the error message I would also be interested in
a solution to the problem, which I assume is due to an incompatibility
between the new version of R and the  package 'directlabels'.

Cheers,

Loris

-- 
This signature is currently under construction.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] readline issue with 3.3.1

2016-07-25 Thread Ralf Goertz
Am Mon, 25 Jul 2016 08:57:17 +0200
schrieb Martin Maechler :

>> Ralf Goertz  on Fri, 22 Jul 2016 10:15:36 +0200
>> writes:  
> 
>> It would be great if – while fixing this – you also took care of the
>> SIGWINCH problem described in bug report
>> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16604  

> Well, that *has* been fixed in 'R-devel' and 'R 3.3.1 patched' ... but
> again only for readline >= 6.3

[snip]

> One reason we have not closed the bug is that the fix is only for
> readline >= 6.3, ... and also that I don't think we got much of user
> confirmation of the form " yes, the bug goes away once I compile
> R-devel or R-patched "

Thanks for the explanation. I will provide confirmation as soon as
R-patched hits my repositories. ;-)

Ralf

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] readline issue with 3.3.1

2016-07-25 Thread Martin Maechler
> Ralf Goertz 
> on Fri, 22 Jul 2016 10:15:36 +0200 writes:

> Am Thu, 21 Jul 2016 18:07:43 +0200 schrieb Martin Maechler
> :

>> Ralf Goertz  on Wed, 20 Jul 2016
>> 16:37:53 +0200 writes:
 
>>> I installed readline version 6.3 and the issue is
>>> gone. So probably some of the recent changes in R's
>>> readline code are incompatible with version readline
>>> version 6.2.
>> 
>> Yes, it seems so, unfortunately.
>> 
>> Thank you for reporting !

> It would be great if – while fixing this – you also took
> care of the SIGWINCH problem described in bug report
> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16604

Well, that *has* been fixed in 'R-devel' and 'R 3.3.1 patched'
..  but again only for readline >= 6.3

(The release process of 3.3.1 was already too much advanced, and
 such source changes are delicate)

It is quite a bit of work to get correct code for the different
versions of readline, also dealing with the fact that e.g. on
Mac OSX the code needs to work with the libedit/editlib
"substitute".

One reason we have not closed the bug is that the fix is only
for readline >= 6.3, ... and also that I don't think we got much
of user confirmation of the form
   " yes, the bug goes away once I compile R-devel or R-patched
   "

> Thanks, Ralf

You are welcome, Martin

> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and
> more, see https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.