Re: [R] how to expand the dataframe

2016-07-20 Thread William Dunlap via R-help
You need to show, not tell, what you did to get better answers.  Did you
use the all=TRUE argument to merge()?

> df <-
data.frame(A=c(10,11,12),B=c(5,5,4),C=c(3.3,4,3),time=as.Date(c("1990-01-01","1990-02-07","1990-02-14")))
0
> merge(df, data.frame(time=seq(as.Date("1990-01-01"),
to=as.Date("1990-02-15"), by="days")), all.y=TRUE)
 time  A  B   C
1  1990-01-01 10  5 3.3
2  1990-01-02 NA NA  NA
3  1990-01-03 NA NA  NA
...
36 1990-02-05 NA NA  NA
37 1990-02-06 NA NA  NA
38 1990-02-07 11  5 4.0
39 1990-02-08 NA NA  NA
...


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Wed, Jul 20, 2016 at 8:26 PM, lily li  wrote:

> Yes, I tried to create a dataframe and merge it with the shortened
> dataframe. The resulting dataframe goes with the short one and truncates
> the complete date column, so it does not work.
>
> On Wed, Jul 20, 2016 at 6:38 PM, David Winsemius 
> wrote:
>
> >
> > > On Jul 20, 2016, at 1:31 PM, lily li  wrote:
> > >
> > > Hi R users,
> > >
> > > I have a dataframe, where there is a column 'time' represents time
> series
> > > but is not complete. How to expand the dataframe so this column will
> > become
> > > complete, where other columns with the newly added rows have NA values?
> > > Thanks.
> > >
> > > df
> > > A B C time
> > > 105 3.3 1990-01-01
> > > 115  4 1990-02-07
> > > 124 3  1990-02-14
> > > ...
> >
> > Make a dataframe with a 'time' column using seq.Date and merge that
> > dataframe with your df dataframe.
> >
> > >
> > >   [[alternative HTML version deleted]]
> >
> > Really  isn't it time you learned how to send plain text. You've
> > posted many questions on Rhelp.  It's really not that difficult on
> gmail. I
> > also have a gmail account and have had no difficulty finding instructions
> > on how to do it.
> >
> > >
> > > __
> > > 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
> >
> >
>
> [[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.
>

[[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] how to expand the dataframe

2016-07-20 Thread lily li
Yes, I tried to create a dataframe and merge it with the shortened
dataframe. The resulting dataframe goes with the short one and truncates
the complete date column, so it does not work.

On Wed, Jul 20, 2016 at 6:38 PM, David Winsemius 
wrote:

>
> > On Jul 20, 2016, at 1:31 PM, lily li  wrote:
> >
> > Hi R users,
> >
> > I have a dataframe, where there is a column 'time' represents time series
> > but is not complete. How to expand the dataframe so this column will
> become
> > complete, where other columns with the newly added rows have NA values?
> > Thanks.
> >
> > df
> > A B C time
> > 105 3.3 1990-01-01
> > 115  4 1990-02-07
> > 124 3  1990-02-14
> > ...
>
> Make a dataframe with a 'time' column using seq.Date and merge that
> dataframe with your df dataframe.
>
> >
> >   [[alternative HTML version deleted]]
>
> Really  isn't it time you learned how to send plain text. You've
> posted many questions on Rhelp.  It's really not that difficult on gmail. I
> also have a gmail account and have had no difficulty finding instructions
> on how to do it.
>
> >
> > __
> > 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
>
>

[[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] Build command in library(devtools)

2016-07-20 Thread Hadley Wickham
The first place to start is to make sure you have the latest version of
devtools. If that doesn't work, please file an issue on devtools' GitHub.

Hadley

On Wednesday, July 20, 2016, Steven Yen  wrote:

> Here is what I found. I had to go back to as early as R 3.0.3 (March,
> 2014) along with Rtools30.exe that works with that version of R, in
> order for devtools to work right. With other/later version of R, I end
> up building a package with
> library(devtools); build("yenlib",binary=F)
> with no error message but the package does not run correctly; or with
> library(devtools); build("yenlib",binary=T)
> which deliver an error that says zip command failed (bevtools calls
> Rtools when binary=T).
>
> Updated versions are good, but what's the use if they do not work for a
> situation like this.
>
> Any help/insight would be appreciated.
>
> On 7/20/2016 10:08 AM, Steven Yen wrote:
> > On 7/19/2016 4:38 PM, John McKown wrote:
> >> On Tue, Jul 19, 2016 at 3:15 PM, Steven Yen  
> >> >>wrote:
> >>
> >> I recently updated my R and RStudio to the latest version and
> >> now the
> >> binary option in the "build" command in devtools stops working.
> >>
> >> I went around and used the binary=F option which worked by I get
> >> the
> >> .tar.gz file instead of the .zip file which I prefer.
> >>
> >> Does anyone understand the following error message:
> >>
> >> status 127
> >> running 'zip' failed
> >>
> >>
> >> ​I'm not totally sure, but I think that means that R cannot find the
> >> "zip" program in order to run it. ​
>
>
> [[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.



-- 
http://hadley.nz

[[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] how to expand the dataframe

2016-07-20 Thread David Winsemius

> On Jul 20, 2016, at 1:31 PM, lily li  wrote:
> 
> Hi R users,
> 
> I have a dataframe, where there is a column 'time' represents time series
> but is not complete. How to expand the dataframe so this column will become
> complete, where other columns with the newly added rows have NA values?
> Thanks.
> 
> df
> A B C time
> 105 3.3   1990-01-01
> 115  4 1990-02-07
> 124 3  1990-02-14
> ...

Make a dataframe with a 'time' column using seq.Date and merge that dataframe 
with your df dataframe.

> 
>   [[alternative HTML version deleted]]

Really  isn't it time you learned how to send plain text. You've posted 
many questions on Rhelp.  It's really not that difficult on gmail. I also have 
a gmail account and have had no difficulty finding instructions on how to do it.

> 
> __
> 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] Build command in library(devtools)

2016-07-20 Thread Steven Yen
Here is what I found. I had to go back to as early as R 3.0.3 (March, 
2014) along with Rtools30.exe that works with that version of R, in 
order for devtools to work right. With other/later version of R, I end 
up building a package with
library(devtools); build("yenlib",binary=F)
with no error message but the package does not run correctly; or with
library(devtools); build("yenlib",binary=T)
which deliver an error that says zip command failed (bevtools calls 
Rtools when binary=T).

Updated versions are good, but what's the use if they do not work for a 
situation like this.

Any help/insight would be appreciated.

On 7/20/2016 10:08 AM, Steven Yen wrote:
> On 7/19/2016 4:38 PM, John McKown wrote:
>> On Tue, Jul 19, 2016 at 3:15 PM, Steven Yen > >wrote:
>>
>> I recently updated my R and RStudio to the latest version and
>> now the
>> binary option in the "build" command in devtools stops working.
>>
>> I went around and used the binary=F option which worked by I get
>> the
>> .tar.gz file instead of the .zip file which I prefer.
>>
>> Does anyone understand the following error message:
>>
>> status 127
>> running 'zip' failed
>>
>>
>> ​I'm not totally sure, but I think that means that R cannot find the
>> "zip" program in order to run it. ​


[[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] pairs: adjusting margins and labeling axes

2016-07-20 Thread William Michels via R-help
Hi Michael, is this the direction you'd like to go (simplified)?

?pairs
pairs(iris, log="xy", asp=1, gap=0.1)

--Bill.


On Tue, Jul 19, 2016 at 2:37 PM, Michael Young  wrote:

> I want to make this as easy as possible.  The extra space could just go
> around the plot in the margin area.  I could then use a cropping tool to
> paste the plot into Excel or Word.
>
> I'm not opposed to using another package, but I'd need some kind of
> pre-existing code to tinker with.
>
> On Tue, Jul 19, 2016 at 11:16 AM, Greg Snow <538...@gmail.com> wrote:
>
> > If you want square plots on a rectangular plotting region, then where
> > do you want the extra space to go?
> >
> > One option would be to add outer margins to use up the extra space.
> > The calculations to figure out exactly how much space to put in the
> > outer margins will probably not be trivial.
> >
> > Another option would be to not use `pairs`, but use the `layout`
> > function directly and loops to do your plots (and use the `respect`
> > argument to `layout`).
> >
> > On Tue, Jul 19, 2016 at 11:29 AM, michael young
> >  wrote:
> > > The default shape for this correlation scatterplot is rectangle.  I
> > changed
> > > it to square, but then the x-axis spacing between squares are off.  Is
> > > there an easy way to change x-axis spacing between squares to that of
> the
> > > y-axis spacing size?
> > >
> > > I decided to hide the name values of the diagonal squares.  I want them
> > > along the x and y axis instead, outside of the fixed number scale I
> have.
> > > I haven't seen any online example of 'pairs' with this and all my
> > searches
> > > have yielded nothing.  Any ideas?  Thanks
> > >
> > > par(pty="s")
> > > panel.cor <- function(x, y, digits = 2, prefix="", cex.cor, ...)
> > > {
> > > usr <- par("usr"); on.exit(par(usr))
> > > par(usr = c(0, 1, 0, 1),xlog=FALSE,ylog=FALSE)
> > > # correlation coefficient
> > > r <- cor(x, y)
> > > txt <- format(c(r, 0.123456789), digits = digits)[1]
> > > txt <- paste("r= ", txt, sep = "")
> > > if(missing(cex.cor)) cex.cor <- 0.8/strwidth(txt)
> > > text(0.5, 0.6, txt, cex=cex.cor * r)
> > >
> > > # p-value calculation
> > > p <- cor.test(x, y)$p.value
> > > txt2 <- format(c(p, 0.123456789), digits = digits)[1]
> > > txt2 <- paste("p= ", txt2, sep = "")
> > > if(p<0.01) txt2 <- paste("p= ", "<0.01", sep = "")
> > > text(0.5, 0.4, txt2)
> > > }
> > >
> > > pairs(iris, upper.panel = panel.cor,xlim=c(0.1,10),
> > > ylim=c(0.1,10),log="xy",text.panel = NULL,pch=".")
> > >
> > > [[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.
> >
> >
> >
> > --
> > Gregory (Greg) L. Snow Ph.D.
> > 538...@gmail.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.
>

[[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] how to expand the dataframe

2016-07-20 Thread Jeff Newmiller
Look at the zoo or data.table packages. 
-- 
Sent from my phone. Please excuse my brevity.

On July 20, 2016 1:31:26 PM PDT, lily li  wrote:
>Hi R users,
>
>I have a dataframe, where there is a column 'time' represents time
>series
>but is not complete. How to expand the dataframe so this column will
>become
>complete, where other columns with the newly added rows have NA values?
>Thanks.
>
>df
>A B C time
>105 3.3   1990-01-01
>115  4 1990-02-07
>124 3  1990-02-14
>...
>
>   [[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] System of equations with unknowns in R

2016-07-20 Thread David Winsemius

> On Jul 20, 2016, at 10:20 AM, Sachin Kuruvithadam  wrote:
> 
> 
> 
> I have a 3x3 matrix Omega whose elements are unknown, and a defined 3x1 
> parameter vector alpha. I want to define a 3x1 vector delta whose elements 
> are still unknown but depend on alpha and Omega as shown in this image 
> (sorry, but when I write in Latex format it doesn't appear formatted in my 
> preview):
> 
> https://www.dropbox.com/home/Public?preview=model.png
> 
> The term in the brackets simplifies into a number K, so I wrote this function:
> 
> Alpha=c(-0.248,1.092,-0.518)
> K=function(gamma1,gamma2,gamma3,gamma12,gamma23,gamma13){
>
> (1+Alpha[1]*(Alpha[1]+Alpha[2]*gamma12/(gamma1*gamma2)+Alpha[3]*gamma13/(gamma1*gamma3)))^(-1/2)
>}
> 
> gamma1, gamma2, gamma3 are the elements in the diagonal of the 3x3 matrix 
> Omega, whereas gamma12, gamma13, gamma23 are the off-diagonal elements (each 
> elements repeats itself twice, e.g. gamma12=gamma21). So, by putting 6 
> arbitrary values in K() I get the scalar. So far so clear.
> 
> The rest I'm not sure about. I want R to return me a vector delta defined as 
> shown above.

No. Not clear at all. What vector delta?

> How can I write a function that would perform this algebraic calculation, and 
> return a 3x1 vector delta whose elements are the same unknowns as in Omega, 
> but shifted/multiplied by the numbers in alpha?

That expression inside the K()-function would return a single value. I worry 
that you are expecting the Alpha's to retain their distinct bases as would 
happen if they were true 3-vectors.
> 
> 
>   [[alternative HTML version deleted]]

Crossposting to Rhelp and StackOverflow at the same time is deprecated. This is 
the case on  Rhelp, anyway. As far as I can tell SO has no such advice. Please 
read the Posting Guide where you should see that HTML formatted postings are 
discouraged and that most attachments are scrubbed by the email server.  There 
has already been a comment-response on SO where another person reported 
difficulty accessing that image. You would be more likely to learn R coding if 
you used R code to define an Omega matrix with "dummy" values for testing and 
then tried passing it just as a square matrix to a function.

__
> 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.


[R] how to expand the dataframe

2016-07-20 Thread lily li
Hi R users,

I have a dataframe, where there is a column 'time' represents time series
but is not complete. How to expand the dataframe so this column will become
complete, where other columns with the newly added rows have NA values?
Thanks.

df
A B C time
105 3.3   1990-01-01
115  4 1990-02-07
124 3  1990-02-14
...

[[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] How to plot density distribution based on mean values and quantiles in R?

2016-07-20 Thread David L Carlson
You can estimate the standard deviation from the quantiles, but based on your 
example, the data will not be accurately modeled with a normal distribution.

The quantiles .15 and .85 should be 1.036 standard deviations from the mean:

> qnorm(c(.15, .85))
[1] -1.036433  1.036433

However the .15-quantile is .003 smaller than the mean and the .85-quantile is 
.042 larger than the mean so the data are very strongly right-skewed:

> c(.015-.012, .057-.015)
[1] 0.003 0.042

> round(c(.015-.012, .057-.015)/qnorm(.85), 4)
[1] 0.0029 0.0405

So the standard deviation estimates are .0029 on the left and .0405 on the 
right. 
Even using a log-normal distribution does not help much.

-
David L Carlson
Department of Anthropology
Texas A University
College Station, TX 77840-4352

-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of gcchenleidenuniv
Sent: Monday, July 18, 2016 4:11 PM
To: r-help
Subject: [R] How to plot density distribution based on mean values and 
quantiles in R?

Hi all,

I need to draw density curves based on some published data. But in the article 
only mean value (0.015 ) and quantiles (Q0.15=0.012 , Q0.85=0.057) were given. 
So I was thinking if it is possible to plot density curves solely based on the 
mean value and quantiles. The dnorm(x, mean, sd, log) function needs the 
standard deviation which was not mentioned, so it can not be used in this 
situation.

Many thanks!!
Daniel
[[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.


[R] Upper bound vector in Nloptr

2016-07-20 Thread Narendra Modi
Hello Folks,

I am using "nloptr" optimizer in my program as below.

my.data.var <- c(10,0.25,0.25,0.25,0.25,0.25,
 10,0.25,0.25,0.25,0.25,0.25,
 10,0.25,0.25,0.25,0.25,0.25,
 10,0.25,0.25,0.25,0.25,0.25)

#Option for non-linear optimization algorithm NLOPTR
opts = list("algorithm"="NLOPT_LN_COBYLA",
"xtol_rel"=1.0e-6, "maxeval"= 1)
lb = vector("numeric",length= length(my.data.var))

#NLOPT_LN_COBYLA

result <- nloptr(my.data.var,eval_f = Error.func,lb=lb,
 ub =
c(Inf,1,1,1,1,1,Inf,1,1,1,1,1,Inf,1,1,1,1,1,Inf,1,1,1,1,1),eval_g_ineq=constraint.func,
 opts = opts)

As you can see, I have to explicitly define the "upper bound: ub" as a
long vector in this scenario.

In another case, the number of variables "my.data.var" (24 in the
above example) can go up to 100 and hence. the "upper bound" needs to
be modified. I would like to avoid writing that explicilty in the
"ub".

How can I dynamically do it ?  I am out of ideas here.

Thanks for the help.

__
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] Fuente (Tahoma)

2016-07-20 Thread Mauricio Monsalvo
Gracias, Carlos!
Fatality, la verdad. Pero funcionó.
Primero, hay que instalar el ghostscript, según la plataforma, para GNU:
http://ghostscript.com/download/gsdnld.html
Luego,
install.packages('extrafont')
library(extrafont)
font_import() #Se toma su tiempo.
loadfonts() #Hace algo así como registrarlas...
#Luego se puede graficar, normalmente por lo que entiendo.
# En mi caso:
save_plot("EDA2.pdf", EDA2,
  ncol = 3, nrow = 3,
  base_aspect_ratio = 1.3)
#Y entonces:
Sys.setenv(R_GSCMD = "C:/Program Files/gs/gs9.19/bin/gswin64c.exe") #En
Win, hay que decirle dónde está el Ghostscript. Entiendo que hay que darle
la instrucción cada vez que reseteamos R (en RStudio) o iniciamos una nueva
sesión.
embed_fonts("font_ggplot.pdf", outfile="font_ggplot_embed.pdf") #Embeber el
objeto ggplot2
embed_fonts("font_plot.pdf", outfile="font_plot_embed.pdf") #Embeber el
objeto plot.
Aparentemente, salvo los últimos dos pasos, hay que hacerlo una sola vez.
Saludos.

El 20 de julio de 2016, 15:50, Carlos Ortega 
escribió:

> Hola,
>
> Mira esto: https://github.com/wch/extrafont
>
> Saludos,
> Carlos Ortega
> www.qualityexcellence.es
>
> El 20 de julio de 2016, 17:30, Mauricio Monsalvo 
> escribió:
>
>> Hola.
>> Estoy logrando sacar un gráfico para una presentación en ggloot2 y me está
>> quedando bastante bonito! Pero, tengo es problema con las fuentes:
>> Warning messages:
>> ​>​
>> 1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label),  ... :
>> ​>​
>>   font family not found in Windows font database
>> ​etc.​
>> ​que proviene de
>> > theme_minimal(base_size = 14, base_family = "Tahoma") +
>> ​La verdad es que no quisiera renunciar a la Tahoma. ¿Tengo alguna forma
>> de
>> incluirla en el Win font db que menciona el R? ¿Es un problema del R o es
>> externo? Otros soft que utilizo en mi máquina (incluyendo este correo, el
>> Word, el Excel, etc) utilizan Tahoma sin problemas.
>> ​Muchas gracias!​
>> --
>> Mauricio
>>
>> [[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
>



-- 
Mauricio

[[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] System of equations with unknowns in R

2016-07-20 Thread Berend Hasselman

You don't need the function K.
From the image you need this:


Well at last.
You don't need the function K.


From the image you only need  this:

G <- as.numeric(1+t(Alpha) %*% Omega %*% Alpha)
G
delta <- (Omega %*% Alpha) / sqrt(G)
delta


Berend Hasselman

> On 20 Jul 2016, at 21:17, Sachin Kuruvithadam  wrote:
> 
> Sorry, didn't know that the other site only hosted temporarily. This link 
> should be permanent: https://postimg.org/image/gpp3sohip/
> 
> 
> 
> 
> 
> Da: R-help  per conto di Sachin Kuruvithadam 
> 
> Inviato: mercoledì 20 luglio 2016 20.57
> A: Berend Hasselman
> Cc: r-help@r-project.org
> Oggetto: Re: [R] System of equations with unknowns in R
>  
> 
> 
> Sorry for the empty email, here's a link to the formula: 
> https://unsee.cc/zasobuge/
> Unsee  Free online private photo sharing
> unsee.cc
> Free online private photo sharing
> 
> 
> 
> K is actually intended to be a number. What I need is a way to find the 
> vector delta as a function of the elements of omega.
> 
> 
> 
> Da: Berend Hasselman 
> Inviato: mercoled� 20 luglio 2016 20.13
> A: Sachin Kuruvithadam
> Cc: r-help@r-project.org
> Oggetto: Re: [R] System of equations with unknowns in R
> 
> 
> > On 20 Jul 2016, at 20:07, Berend Hasselman  wrote:
> >
> >
> >
> > This functions a scalar not a function
> 
> Correction. This should have been
> 
> This function returns a scalar not a vector.
> 
> Berend Hasselman
> 
> 
> [[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] System of equations with unknowns in R

2016-07-20 Thread Sachin Kuruvithadam
Sorry, didn't know that the other site only hosted temporarily. This link 
should be permanent: https://postimg.org/image/gpp3sohip/






Da: R-help  per conto di Sachin Kuruvithadam 

Inviato: mercoled� 20 luglio 2016 20.57
A: Berend Hasselman
Cc: r-help@r-project.org
Oggetto: Re: [R] System of equations with unknowns in R



Sorry for the empty email, here's a link to the formula: 
https://unsee.cc/zasobuge/

unsee.cc





K is actually intended to be a number. What I need is a way to find the vector 
delta as a function of the elements of omega.



Da: Berend Hasselman 
Inviato: mercoled? 20 luglio 2016 20.13
A: Sachin Kuruvithadam
Cc: r-help@r-project.org
Oggetto: Re: [R] System of equations with unknowns in R


> On 20 Jul 2016, at 20:07, Berend Hasselman  wrote:
>
>
>
> This functions a scalar not a function

Correction. This should have been

This function returns a scalar not a vector.

Berend Hasselman


[[alternative HTML version deleted]]


[[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] System of equations with unknowns in R

2016-07-20 Thread Berend Hasselman

> On 20 Jul 2016, at 20:57, Sachin Kuruvithadam  wrote:
> 
> 
> 
> Sorry for the empty email, here's a link to the formula: 
> https://unsee.cc/zasobuge/
> 

Link gives eror message:

Unfortunately the images were deleted as requested.

> K is actually intended to be a number. What I need is a way to find the 
> vector delta as a function of the elements of omega. 
> 

This make your problem incomprehensible (at least to me).
I really haven't got a clue of what you want.

Berend Hasselman
> 
> Da: Berend Hasselman 
> Inviato: mercoledì 20 luglio 2016 20.13
> A: Sachin Kuruvithadam
> Cc: r-help@r-project.org
> Oggetto: Re: [R] System of equations with unknowns in R
>  
> 
> > On 20 Jul 2016, at 20:07, Berend Hasselman  wrote:
> > 
> > 
> > 
> > This functions a scalar not a function
> 
> Correction. This should have been
> 
> This function returns a scalar not a vector.
> 
> Berend Hasselman

__
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] System of equations with unknowns in R

2016-07-20 Thread Sachin Kuruvithadam


Sorry for the empty email, here's a link to the formula: 
https://unsee.cc/zasobuge/

K is actually intended to be a number. What I need is a way to find the vector 
delta as a function of the elements of omega.



Da: Berend Hasselman 
Inviato: mercoled� 20 luglio 2016 20.13
A: Sachin Kuruvithadam
Cc: r-help@r-project.org
Oggetto: Re: [R] System of equations with unknowns in R


> On 20 Jul 2016, at 20:07, Berend Hasselman  wrote:
>
>
>
> This functions a scalar not a function

Correction. This should have been

This function returns a scalar not a vector.

Berend Hasselman


[[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-es] Fuente (Tahoma)

2016-07-20 Thread Carlos Ortega
Hola,

Mira esto: https://github.com/wch/extrafont

Saludos,
Carlos Ortega
www.qualityexcellence.es

El 20 de julio de 2016, 17:30, Mauricio Monsalvo 
escribió:

> Hola.
> Estoy logrando sacar un gráfico para una presentación en ggloot2 y me está
> quedando bastante bonito! Pero, tengo es problema con las fuentes:
> Warning messages:
> ​>​
> 1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label),  ... :
> ​>​
>   font family not found in Windows font database
> ​etc.​
> ​que proviene de
> > theme_minimal(base_size = 14, base_family = "Tahoma") +
> ​La verdad es que no quisiera renunciar a la Tahoma. ¿Tengo alguna forma de
> incluirla en el Win font db que menciona el R? ¿Es un problema del R o es
> externo? Otros soft que utilizo en mi máquina (incluyendo este correo, el
> Word, el Excel, etc) utilizan Tahoma sin problemas.
> ​Muchas gracias!​
> --
> Mauricio
>
> [[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

Re: [R] System of equations with unknowns in R

2016-07-20 Thread Berend Hasselman

> On 20 Jul 2016, at 20:07, Berend Hasselman  wrote:
> 
> 
> 
> This functions a scalar not a function

Correction. This should have been

This function returns a scalar not a vector.

Berend Hasselman

__
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] System of equations with unknowns in R

2016-07-20 Thread Berend Hasselman

> On 20 Jul 2016, at 19:20, Sachin Kuruvithadam  wrote:
> 
> 
> 
> I have a 3x3 matrix Omega whose elements are unknown, and a defined 3x1 
> parameter vector alpha. I want to define a 3x1 vector delta whose elements 
> are still unknown but depend on alpha and Omega as shown in this image 
> (sorry, but when I write in Latex format it doesn't appear formatted in my 
> preview):
> 
> https://www.dropbox.com/home/Public?preview=model.png
> 

I cannot access your image.

> The term in the brackets simplifies into a number K, so I wrote this function:
> 
> Alpha=c(-0.248,1.092,-0.518)
> K=function(gamma1,gamma2,gamma3,gamma12,gamma23,gamma13){
>
> (1+Alpha[1]*(Alpha[1]+Alpha[2]*gamma12/(gamma1*gamma2)+Alpha[3]*gamma13/(gamma1*gamma3)))^(-1/2)
>}
> 

This functions a scalar not a function

> gamma1, gamma2, gamma3 are the elements in the diagonal of the 3x3 matrix 
> Omega, whereas gamma12, gamma13, gamma23 are the off-diagonal elements (each 
> elements repeats itself twice, e.g. gamma12=gamma21). So, by putting 6 
> arbitrary values in K() I get the scalar. So far so clear.
> 
> The rest I'm not sure about. I want R to return me a vector delta defined as 
> shown above. How can I write a function that would perform this algebraic 
> calculation, and return a 3x1 vector delta whose elements are the same 
> unknowns as in Omega, but shifted/multiplied by the numbers in alpha?
> 

You can simplify the gamma arguments of your function K by passing the matrix 
Omega.
Like this


K1 <- function(Omega,Alpha){
gamma1 <- Omega[1,1]   
gamma2 <- Omega[2,2]   
gamma3 <- Omega[3,3]   
gamma12 <- Omega[1,2]
gamma13 <- Omega[1,2]
gamma23 <- Omega[2,3]
z <- 
1+Alpha[1]*(Alpha[1]+Alpha[2]*gamma12/(gamma1*gamma2)+Alpha[3]*gamma13/(gamma1*gamma3))^(-1/2)
z
}


Define as given in your mail

Alpha <- c(-0.248,1.092,-0.518)


Fake a symmetric matrix Omega 


set.seed(413:
library(Matrix)
x <- Matrix(round(runif(9),2), 3)
x

Omega <- forceSymmetric(x)
Omega

# and run the function

K1(Omega,Alpha)


The result is a scalar: 0.8149383

Depending on the contents of Omega the result of K1 may be NaN.

You will have to redefine your function if you want it to return a vector.
You have not given enough information to give an answer to your question.

>   [[alternative HTML version deleted]]
> 


Please do not post in HTML.

Berend Hasselman
> __
> 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] probelm with xlab ylab and xaxp barplot

2016-07-20 Thread Marc Schwartz

> 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.

Regards,

Marc Schwartz

__
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] System of equations with unknowns in R

2016-07-20 Thread Sachin Kuruvithadam


I have a 3x3 matrix Omega whose elements are unknown, and a defined 3x1 
parameter vector alpha. I want to define a 3x1 vector delta whose elements are 
still unknown but depend on alpha and Omega as shown in this image (sorry, but 
when I write in Latex format it doesn't appear formatted in my preview):

https://www.dropbox.com/home/Public?preview=model.png

The term in the brackets simplifies into a number K, so I wrote this function:

Alpha=c(-0.248,1.092,-0.518)
K=function(gamma1,gamma2,gamma3,gamma12,gamma23,gamma13){

(1+Alpha[1]*(Alpha[1]+Alpha[2]*gamma12/(gamma1*gamma2)+Alpha[3]*gamma13/(gamma1*gamma3)))^(-1/2)
}

gamma1, gamma2, gamma3 are the elements in the diagonal of the 3x3 matrix 
Omega, whereas gamma12, gamma13, gamma23 are the off-diagonal elements (each 
elements repeats itself twice, e.g. gamma12=gamma21). So, by putting 6 
arbitrary values in K() I get the scalar. So far so clear.

The rest I'm not sure about. I want R to return me a vector delta defined as 
shown above. How can I write a function that would perform this algebraic 
calculation, and return a 3x1 vector delta whose elements are the same unknowns 
as in Omega, but shifted/multiplied by the numbers in alpha?


[[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] Geom_smooth

2016-07-20 Thread Jeff Newmiller
No, it refers to confidence level. Refer to your training in statistics for 
that definition.
-- 
Sent from my phone. Please excuse my brevity.

On July 20, 2016 10:01:44 AM PDT, Tom Subia  wrote:
>Default level = 0.95.
>Does this mean +/- 0.025 from estimate?
>
>   [[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] Geom_smooth

2016-07-20 Thread ruipbarradas
No, it means precisely the opposite.
Google "confidence interval", please.

Rui Barradas
 

Citando Tom Subia :

> Default level = 0.95.
> Does this mean +/- 0.025 from estimate?
>
>         [[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.htmland 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] Geom_smooth

2016-07-20 Thread John Kane
The question could use a bit more information but have a look at 
http://docs.ggplot2.org/0.9.3.1/stat_smooth.html#.  This may explain it. 

You might also want to have a look at 
http://adv-r.had.co.nz/Reproducibility.html for some guidelines on asking 
questions in Rhelp or StackOverflow, etc.

John Kane
Kingston ON Canada


> -Original Message-
> From: tgs...@gmail.com
> Sent: Wed, 20 Jul 2016 10:01:44 -0700
> To: r-help@r-project.org
> Subject: [R] Geom_smooth
> 
> Default level = 0.95.
> Does this mean +/- 0.025 from estimate?
> 
>   [[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.


Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!

__
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] Geom_smooth

2016-07-20 Thread Tom Subia
Default level = 0.95.
Does this mean +/- 0.025 from estimate?

[[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-es] un solo un favor

2016-07-20 Thread Manuel Spínola
Hola Mauricio,

No entiendo 2 cosas en tu código:

1. Por qué proyectas el mismo objeto:

> study_area_UTM <- spTransform(study_area, CRS("+proj=utm +zone=19
+datum=WGS84"))

> study_area_UTM <- spTransform(study_area_UTM, CRS(
+ paste("+x_0=-200.0 +y_0=-50.0 +ellps=GRS80 +units=us-ft
+no_defs")))

2. Por qué usas "paste" (creo que no deberías usarlo).

Manuel Spínola

El 20 de julio de 2016, 10:43, Mauricio Mardones Inostroza <
mauricio.mardo...@ifop.cl> escribió:

> Hola a todos
> Esta es mi primera pregunta en el grupo, y es sencilla pero me tiene
> atascado. Estoy tratando de cortar mi mapa de (poner limites en UTM)  en un
> lugar definido como mi area de estudio (en este caso el sur de chile). Pero
> creo no estar usando bien la función CRS ponendo bien los limites
> requeridos.
>
>
> > study_area <- readRDS("CHL_adm0.rds")
> > study_area_UTM <- spTransform(study_area, CRS("+proj=utm +zone=19
> +datum=WGS84"))
> > study_area_UTM <- spTransform(study_area_UTM, CRS(
> + paste("+x_0=-200.0 +y_0=-50.0 +ellps=GRS80 +units=us-ft
> +no_defs")))
> Error in spTransform(study_area_UTM, CRS(paste("+x_0=-200.0
> +y_0=-50.0 +ellps=GRS80 +units=us-ft +no_defs"))) :
>   error in evaluating the argument 'CRSobj' in selecting a method for
> function 'spTransform': Error in CRS(paste("+x_0=-200.0 +y_0=-50.0
> +ellps=GRS80 +units=us-ft +no_defs")) :
>   projection not named
>
>
>
> Espero me puedan ayudar.
>
> Saludos
> --
>
> *Mauricio Mardones Inostroza*
>
> Investigador Departamento Evaluación de Recursos
> Instituto de Fomento Pesquero - IFOP
> Valparaíso - Chile
> +56-32-21514 42
>
> www.ifop.cl
>
> [[alternative HTML version deleted]]
>
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>



-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspin...@una.cr 
mspinol...@gmail.com
Teléfono: (506) 8706 - 4662
Personal website: Lobito de río 
Institutional website: ICOMVIS 

[[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] Esperanza de vida librería 'demography'

2016-07-20 Thread CARMEN MARTINEZ OLMO
Buenos d�as,

Estamos intentando calcular la esperanza de vida con la librer�a 'demography' 
de R. Dicha librer�a utiliza el modelo de Lee-Carter para estimar el riesgo en 
funci�n de la edad 'biom�trica' y del a�o natural. Mi pregunta es sobre la 
funci�n 'lifetime expectancy' �c�mo realiza el c�lculo dicha funci�n?�a partir 
de los datos reales o del modelo ajustado?. En caso de que nadie la haya usado 
�alguien sabr�a d�nde puedo conseguir esta informaci�n?

Muchas gracias y saludos,
Carmen Mart�nez






Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener informaci�n privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilizaci�n, divulgaci�n y/o copia sin 
autorizaci�n puede estar prohibida en virtud de la legislaci�n vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma v�a y proceda a su destrucci�n.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinat�rio, pode 
conter informa��o privilegiada ou confidencial e � para uso exclusivo da pessoa 
ou entidade de destino. Se n�o � vossa senhoria o destinat�rio indicado, fica 
notificado de que a leitura, utiliza��o, divulga��o e/ou c�pia sem autoriza��o 
pode estar proibida em virtude da legisla��o vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destrui��o

[[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] un solo un favor

2016-07-20 Thread Mauricio Mardones Inostroza
Hola a todos
Esta es mi primera pregunta en el grupo, y es sencilla pero me tiene
atascado. Estoy tratando de cortar mi mapa de (poner limites en UTM)  en un
lugar definido como mi area de estudio (en este caso el sur de chile). Pero
creo no estar usando bien la función CRS ponendo bien los limites
requeridos.


> study_area <- readRDS("CHL_adm0.rds")
> study_area_UTM <- spTransform(study_area, CRS("+proj=utm +zone=19
+datum=WGS84"))
> study_area_UTM <- spTransform(study_area_UTM, CRS(
+ paste("+x_0=-200.0 +y_0=-50.0 +ellps=GRS80 +units=us-ft
+no_defs")))
Error in spTransform(study_area_UTM, CRS(paste("+x_0=-200.0
+y_0=-50.0 +ellps=GRS80 +units=us-ft +no_defs"))) :
  error in evaluating the argument 'CRSobj' in selecting a method for
function 'spTransform': Error in CRS(paste("+x_0=-200.0 +y_0=-50.0
+ellps=GRS80 +units=us-ft +no_defs")) :
  projection not named



Espero me puedan ayudar.

Saludos
-- 

*Mauricio Mardones Inostroza*

Investigador Departamento Evaluación de Recursos
Instituto de Fomento Pesquero - IFOP
Valparaíso - Chile
+56-32-21514 42

www.ifop.cl

[[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] ... distribution based on mean values and quantiles in R?

2016-07-20 Thread Guangchao Chen
Dear Martin,

Thank you very much for your detailed explanation! I will have a look at the
poweRlaw package and see if things can be sorted out!

Best,
Daniel

On 19 July 2016 at 12:15, Martin Maechler 
wrote:

> > Jim Lemon 
> > on Tue, 19 Jul 2016 16:20:49 +1000 writes:
>
> > Hi Daniel,
> > Judging by the numbers you mention, the distribution is either very
> > skewed or not at all normal. If you look at this:
>
> > plot(c(0,0.012,0.015,0.057,0.07),c(0,0.05,0.4,0.05,0),type="b")
>
> > you will see the general shape of whatever distribution produced
> these
> > summary statistics. Did the paper give any hints as to what the model
> > distribution might be?
>
> Yes, that's the correct question:  At first, it's not about
> plotting, about *fitting* a distribution with the desired
> properties, and then you can easily visualize it.
>
> So, what were the data?  If they are 'amounts' of any kind, they
> are necessarily non-negative often always positive, and hence
> --- according to John W Tukey --- should be analyzed after
> taking logs (Tukey's "first aid transformation" for *any*
> amounts data).
>
> Taking logs, and analyzing means to consider a normal
> ("Gaussian") distribution for the log()  which is
> equivalent to fitting a  lognormal distribution -- R functions
> [dpqrr]lnorm()
> to the original data.  I'd strongly recommend doing that.
>
> And I did so, finding out, however that if indeed it is the
> *mean* and the 15% and 95% quantiles,  a log normal is not
> fitting.  Here is the reproducible R code .. with lots of
> comments :
>
>
> ##
> ## MM  strongly recommends to fit a  log-normal distribution .. however it
> does *not* fit
>
> ## The "data statistics"
> qlN <- c(q15 = 0.012, q85 = 0.057) # Quantiles original scale
> mlN <- 0.015
>
> (qn <- log(qlN))  # Quantiles log scale [assumed normal
> (Gaussian) here]
> ## as the Gaussian is symmetri, the mid value of the two quantiles is the
> mean and median :
> (mu <- mean(qn))   # -3.644
> (medlN <- exp(mu)) # 0.02615
> ## an estimate for the median(.)  -- but  it is *larger* than the mean =
> 0.015 above !
> ## ===> Log-normal does *NOT* fit well :
>
> ## From the help page, we learn that
> ##E[lN] = exp(mu + 1/2 sigma^2){and it is trivial that}
> ##   median[lN] = exp(mu)
> ## where here, our medLn is a (moment) estimate of median[lN]
>
> ## If the number were different, this would solve the problem :
> ## Consequently, a (moment / plugin) estimate for sigma is
> (e12sig <- mlN / medlN) ## ~= exp( 1/2 sigma^2)
> (sig2 <- 2*log(e12sig)) ## ~=  sigma^2  [--- is *NEGATIVE* (<==>
> 'est.median' > mean !)]
> (sig <- sqrt(sig2)) ## ~=  sigma[here of course 'NaN' with a
> warning !]
>
>
> My conclusion would be that other distributions (than the
> log-normal; the normal  is out of question !!) have to be
> considered, if you want to be serious about the topic.
>
> Maybe the poweRlaw package (https://cloud.r-project.org/package=poweRlaw)
> may help you (it has 4 vignettes, the last being a nice JSS publication).
>
> The above is a "cute" non-standard problem in any case: to fit very skewed
> distributions, given two quantiles and the mean only, and the
> approach taken by the "poweRlawyers", namely to minimize the KS
> (Kolmogorov-Smirnoff) decrepancy seems a good start to me.
>
> Martin Maechler,
> ETH Zurich
>
>
>
> > Jim
>
>
> > On Tue, Jul 19, 2016 at 7:11 AM, gcchenleidenuniv
> >  wrote:
> >> Hi all,
> >>
> >> I need to draw density curves based on some published data. But in
> the article only mean value (0.015 ) and quantiles (Q0.15=0.012 ,
> Q0.85=0.057) were given. So I was thinking if it is possible to plot
> density curves solely based on the mean value and quantiles. The dnorm(x,
> mean, sd, log) function needs the standard deviation which was not
> mentioned, so it can not be used in this situation.
> >>
> >> Many thanks!!
> >> Daniel
> >> [[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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] shinyApp.io error message "

2016-07-20 Thread Michael Power
Hi

I am new to this list and quite new to R and Shiny, so am likely to expose my 
ignorance about things I should know.

My first ShinyApp runs as expected under RStudio, but when I publish it using 
ShinyApp.io it gives on startup the error message:

   "plot.new has not been called yet", even when I do call plot.new.


Earlier versions (which I have not kept) did work as expected, and I do not 
know what I am doing differently now.

The R code can be viewed here:


https://drive.google.com/folderview?id=0B2pp1x41KL5XZUVmMFAydUxMemM=sharing 

Any advice would be much appreciated.

Thanks

Michael

__
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] probelm with xlab ylab and xaxp barplot

2016-07-20 Thread Abdoulaye SARR
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
__
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] pairs: adjusting margins and labeling axes

2016-07-20 Thread Michael Young
I want to make this as easy as possible.  The extra space could just go
around the plot in the margin area.  I could then use a cropping tool to
paste the plot into Excel or Word.

I'm not opposed to using another package, but I'd need some kind of
pre-existing code to tinker with.

On Tue, Jul 19, 2016 at 11:16 AM, Greg Snow <538...@gmail.com> wrote:

> If you want square plots on a rectangular plotting region, then where
> do you want the extra space to go?
>
> One option would be to add outer margins to use up the extra space.
> The calculations to figure out exactly how much space to put in the
> outer margins will probably not be trivial.
>
> Another option would be to not use `pairs`, but use the `layout`
> function directly and loops to do your plots (and use the `respect`
> argument to `layout`).
>
> On Tue, Jul 19, 2016 at 11:29 AM, michael young
>  wrote:
> > The default shape for this correlation scatterplot is rectangle.  I
> changed
> > it to square, but then the x-axis spacing between squares are off.  Is
> > there an easy way to change x-axis spacing between squares to that of the
> > y-axis spacing size?
> >
> > I decided to hide the name values of the diagonal squares.  I want them
> > along the x and y axis instead, outside of the fixed number scale I have.
> > I haven't seen any online example of 'pairs' with this and all my
> searches
> > have yielded nothing.  Any ideas?  Thanks
> >
> > par(pty="s")
> > panel.cor <- function(x, y, digits = 2, prefix="", cex.cor, ...)
> > {
> > usr <- par("usr"); on.exit(par(usr))
> > par(usr = c(0, 1, 0, 1),xlog=FALSE,ylog=FALSE)
> > # correlation coefficient
> > r <- cor(x, y)
> > txt <- format(c(r, 0.123456789), digits = digits)[1]
> > txt <- paste("r= ", txt, sep = "")
> > if(missing(cex.cor)) cex.cor <- 0.8/strwidth(txt)
> > text(0.5, 0.6, txt, cex=cex.cor * r)
> >
> > # p-value calculation
> > p <- cor.test(x, y)$p.value
> > txt2 <- format(c(p, 0.123456789), digits = digits)[1]
> > txt2 <- paste("p= ", txt2, sep = "")
> > if(p<0.01) txt2 <- paste("p= ", "<0.01", sep = "")
> > text(0.5, 0.4, txt2)
> > }
> >
> > pairs(iris, upper.panel = panel.cor,xlim=c(0.1,10),
> > ylim=c(0.1,10),log="xy",text.panel = NULL,pch=".")
> >
> > [[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.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> 538...@gmail.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] txtProgressBar()

2016-07-20 Thread Greg Snow
You need to figure out how to tell txtProgressBar what the progress is.

One simple option would be that if you are installing 10 packages,
then create the bar with a range of values from 0 to 10 and initialize
it at 0, then after the first package installs update it to show 1,
after the 2nd installs update it to show 2, etc. until all 10 are
installed.

This is the simplest from the programming side, but the packages may
take different amounts of time to install.  If you have a feel for how
long they take to install (relative to each other) then you can
incorporate this with a percentage, e.g. after the 1st package
installs you may set the bar to 28%, after the second installs you may
then update it to 31%, etc. with the jumps proportional to expected
time to install.


On Wed, Jul 20, 2016 at 2:00 AM, Ivan Calandra
 wrote:
> Dear useRs,
>
> In a script that will be source()d, I want to install the uninstalled
> packages and follow the progression with a bar. So I looked at
> txtProgressBar() but I cannot figure out how to use it to show the
> progression of the installation.
>
> All the examples I have found just display the progress of... the progress
> bar itself ?
>
> Any idea?
>
> Thanks in advance,
> Ivan
>
> --
> Ivan Calandra, PhD
> Scientific Mediator
> University of Reims Champagne-Ardenne
> GEGENAA - EA 3795
> CREA - 2 esplanade Roland Garros
> 51100 Reims, France
> +33(0)3 26 77 36 89
> ivan.calan...@univ-reims.fr
> --
> https://www.researchgate.net/profile/Ivan_Calandra
> https://publons.com/author/705639/
>
> __
> 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.



-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

__
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-es] Fuente (Tahoma)

2016-07-20 Thread Mauricio Monsalvo
Hola.
Estoy logrando sacar un gráfico para una presentación en ggloot2 y me está
quedando bastante bonito! Pero, tengo es problema con las fuentes:
Warning messages:
​>​
1: In grid.Call(L_textBounds, as.graphicsAnnot(x$label),  ... :
​>​
  font family not found in Windows font database
​etc.​
​que proviene de
> theme_minimal(base_size = 14, base_family = "Tahoma") +
​La verdad es que no quisiera renunciar a la Tahoma. ¿Tengo alguna forma de
incluirla en el Win font db que menciona el R? ¿Es un problema del R o es
externo? Otros soft que utilizo en mi máquina (incluyendo este correo, el
Word, el Excel, etc) utilizan Tahoma sin problemas.
​Muchas gracias!​
-- 
Mauricio

[[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] Concatenate two lists replacing elements with the same name.

2016-07-20 Thread Luca Cerone
thanks a lot for the help!

On Tue, Jul 19, 2016 at 7:20 PM, Gabor Grothendieck
 wrote:
> Try this:
>
> Reduce(modifyList, list(x, y, z))
>
> On Tue, Jul 19, 2016 at 12:34 PM, Luca Cerone  wrote:
>> Dear all,
>> I would like to know if there is a function to concatenate two lists
>> while replacing elements with the same name.
>>
>> For example:
>>
>> x <- list(a=1,b=2,c=3)
>> y <- list( b=4, d=5)
>> z <- list(a = 6, b = 8, e= 7)
>>
>> I am looking for a function "concatfun" so that
>>
>> u <- concatfun(x,y,z)
>>
>> returns:
>>
>> u$a=6
>> u$b=8
>> u$c=3
>> u$d=5
>> u$e=7
>>
>> I.e. it combines the 3 lists, but when names have the same value it
>> keeps the most recent one.
>>
>> Does such a function exists?
>>
>> Thanks for the help,
>>
>> Cheers,
>> Luca
>>
>> __
>> 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.
>
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com

__
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] frequency of items

2016-07-20 Thread sri vathsan
Hi all,

I understand this is not a data frame but an individual variable from the
data frame which is a list. Since, I need to work on this particular
variable I just added here as a sample data.

Jim, your code solved the purpose.Thanks!

Regards,
Srivathsan


On Wed, Jul 20, 2016 at 4:29 PM, Ulrik Stervbo 
wrote:

> What you show cannot be a data.frame. Using what you gave, this should
> help you along:
>
> x <- c(11,15,12,25, 11,12, 15,25, 134,45,56, 46, 45,56, 15,12,
> 66,45,56,24,14,11,25,12,134)
> table(x)
>
> On Wed, 20 Jul 2016 at 11:44 Jim Lemon  wrote:
>
>> Oops, didn't translate that function correctly:
>>
>> has_values<-function(x,values) {
>>  if(is.list(x)) {
>>   return(sum(unlist(lapply(svlist,
>>function(x,values) return(all(values %in% x)),values
>>  }
>> }
>>
>> Jim
>>
>> On Wed, Jul 20, 2016 at 7:18 PM, Jim Lemon  wrote:
>> > Hi sri,
>> > Maybe something like this?
>> >
>> > has_values<-function(x,values) {
>> >  if(is.list(x)) {
>> >   return(sum(unlist(lapply(svlist,
>> >function(x,values) return(all(values %in% x)),c(11,12)
>> >  }
>> > }
>> >
>> > svlist<-list(a=c(11,15,12,25),
>> >  b=c(11,12),
>> >  c=c(15,25),
>> >  d=c(134,45,56),
>> >  e=46,
>> >  f=c(45,56),
>> >  g=c(15,12),
>> >  h=c(66,45,56,24,14,11,25,12,134))
>> >
>> > has_values(svlist,c(11,12))
>> >
>> > Jim
>> >
>> > On Tue, Jul 19, 2016 at 8:59 PM, sri vathsan 
>> wrote:
>> >> Hi,
>> >>
>> >> I have a data frame like below.
>> >> 11,15,12,25
>> >> 11,12
>> >> 15,25
>> >> 134,45,56
>> >> 46
>> >> 45,56
>> >> 15,12
>> >> 66,45,56,24,14,11,25,12,134
>> >>
>> >> I want to identify the frequency of pairs/triplets or higher that
>> occurs in
>> >> the data. Say for example, in above data the occurrence of pairs looks
>> like
>> >> below
>> >>
>> >> item No of occurrence
>> >> 11,12 3
>> >> 11,25 2
>> >> 15,12 2
>> >> 15,25 2
>> >> .
>> >> .
>> >> 45,56  3
>> >> 134,45,562
>> >>
>> >>  and so on
>> >>
>> >> I am trying to write R code for the above and I am finding difficulty
>> to
>> >> approach this. Looking forward some help.
>> >>
>> >> Thanks!
>> >>
>> >> --
>> >>
>> >> Regards,
>> >> Srivathsan.K
>> >>
>> >> [[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.
>>
>


-- 

Regards,
Srivathsan.K
Phone : 9600165206

[[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] readline issue with 3.3.1

2016-07-20 Thread Ralf Goertz
Am Wed, 20 Jul 2016 11:35:31 +0200
schrieb Ralf Goertz :

> Hi,
> 
> after a recent update to version 3.3.1 on Opensuse Leap I have
> problems with command lines longer than the terminal width. E.g. when
> I do this

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.

__
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] multiple-line plot

2016-07-20 Thread Adams, Jean
Use the dput() function to share a subset of your data with the list
(attachments are not supported).

For example, submit this command
 dput(for_jhon[1:20, ])
and post the result to the list along with your question.

Jean

On Tue, Jul 19, 2016 at 1:24 PM, John Wasige  wrote:

> ​Dear all,
>
> This is to kindly request for your help. I would like to plot my data.
>
> The R script below gives some plot that is not clear. How can I get a clear
> multiple-line plot. The data is attached herewith.
>
> ##R Script
> for_jhon = read.csv("C:/LVM_share/for_ jhon.csv", header=TRUE, sep=";")
> matplot(for_jhon$ID, cbind(for_jhon[,2:73]))​
>
> Thanks for your help
>
> John
> __
> 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] documenting R reference class methods with roxygen2

2016-07-20 Thread Ben Tupper
Hi,

Yes, it takes a lot of searching for find out how to use roxygen with Ref 
Classes.  Thank goodness for Hadley Wickham's book ( http://r-pkgs.had.co.nz/ ).

For a Ref Class methods are actually documenting NULL, and you need to add the 
"@name Classname_Methodname" tag.  Otherwise, documentation is similar to that 
for functions.

#' Title
#'
#' Other stuff
#'
#' @name MyClass_fooey
#' @param foo_value numeric blah blah blah
#' @return numeric
#' @examples{
#'  \dontrun{
#'  blah blah blah
#'  }
#' }
NULL
MyClass$methods(
fooey = function(foo_value = 3){
cat("in the fooey method\n")
return(foo_value)
})

You could scout out some of the examples here ... 
https://github.com/BigelowLab/flowcamr 


Cheers,
Ben


> On Jul 20, 2016, at 4:26 AM, Witold E Wolski  wrote:
> 
> I would like to document function arguments in R reference classes and
> I do not know how.
> 
> I know that methods description can be provided by adding
> a string below the function declaration. But how to document the
> function arguments in similar fashion like the arguments of R
> functions (which can be documented with @param).
> 
> Thank you.
> 
> PS. Sorry if for some this question is off topic but I did not found a
> mailing list dedicated to roxygen2.
> 
> 
> 
> -- 
> Witold Eryk Wolski
> 
> __
> 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.

Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org

Report Gulf of Maine jellyfish sightings to jellyf...@bigelow.org or tweet them 
to #MaineJellies -- include date, time, and location, as well as any 
descriptive information such as size or type.  Learn more at 
https://www.bigelow.org/research/srs/nick-record/nick-record-laboratory/mainejellies/

__
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] Missing rows anova

2016-07-20 Thread Justin Thong
Hi Michael,

Thank you for the reply.

I am sorry I forgot to print out the anova table to make my question clear.

  DfSum Sq  Mean Sq F value   Pr(>F)
S 20.199.630e-060.8180.444
x110.0002562.560e-04   21.751   9.44e-06 ***
ID   47   0.0035247.498e-056.370 3.35e-15 ***
Resid102   0.0012011.177e-05
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

There is *no* unique value for ID for each combination of S and x1. For
example, S=1 and x1=0 can equal to either  B or C or  D or  E or  F .
Perhaps you mean that for each combination of S and x1 have different
values. If that is the case, I think maybe it makes sense.

*What I think? *
Anova has this thing where it fits the terms of 1st order first ( a formula
term including no interactions) before it fits a 2nd order term ( a formula
term including 1 interaction) and so on.

First Order--> Second Order--> Third Order--> etc

Therefore, it is known that the true fitting formula is not S+x1+S:x1+ID
but it is S+x1+ID+S:x1. Hence, it appears that ID is fitted before S:x1 but
since ID is a more refined factor than S:x1, it can be said that S:x1 is
already included in the fit of ID so R recognizes the linear dependance and
excludes the term S:x1.
In other words, S:x1 is linearly dependant to ID. And so, the row S:x1
disappears because it is considered within ID.

Does this makes sense?








On 19 July 2016 at 16:19, Michael Dewey  wrote:

> Presumably it disappears because there is a unique value of ID for eac
> combination of S*x1 so they are indistinguishable.
>
>
> On 19/07/2016 12:53, Justin Thong wrote:
>
>> Why does the S:x1 column disappear (presumably S:x1 goes into ID but I
>> dont
>> know why)? S is a factor, x1 is a covariate and ID is a factor.
>>
>> rich.side<-aov(y~S*x1+ID)
>> summary(rich.side)
>>
>> Below is the model frame
>>
>> model.frame(~S*x1+ID)
>>
>> S x1  ID
>> 1   1 12   A
>> 2   1 12   A
>> 3   1 12   A
>> 4   1 12   A
>> 5   1  0   B
>> 6   1  0   B
>> 7   1  0   B
>> 8   1  0   B
>> 9   1  0   C
>> 10  1  0   C
>> 11  1  0   C
>> 12  1  0   C
>> 13  1  0   D
>> 14  1  0   D
>> 15  1  0   D
>> 16  1  0   D
>> 17  1  0   E
>> 18  1  0   E
>> 19  1  0   E
>> 20  1  0   E
>> 21  1  0   F
>> 22  1  0   F
>> 23  1  0   F
>> 24  1  0   F
>> 25  2  6  AB
>> 26  2  6  AB
>> 27  2  6  AB
>> 28  2  6  AB
>> 29  2  6  AC
>> 30  2  6  AC
>> 31  2  6  AC
>> 32  2  6  AC
>> 33  2  6  AD
>> 34  2  6  AD
>> 35  2  6  AD
>> 36  2  6  AD
>> 37  2  6  AE
>> 38  2  6  AE
>> 39  2  6  AE
>> 40  2  6  AE
>> 41  2  6  AF
>> 42  2  6  AF
>> 43  2  6  AF
>> 44  2  6  AF
>> 45  2  0  BC
>> 46  2  0  BC
>> 47  2  0  BC
>> 48  2  0  BC
>> 49  2  0  BD
>> 50  2  0  BD
>> 51  2  0  BD
>> 52  2  0  BD
>> 53  2  0  BE
>> 54  2  0  BE
>> 55  2  0  BE
>> 56  2  0  BE
>> 57  2  0  BF
>> 58  2  0  BF
>> 59  2  0  BF
>> 60  2  0  BF
>> 61  2  0  CD
>> 62  2  0  CD
>> 63  2  0  CD
>> 64  2  0  CD
>> 65  2  0  CE
>> 66  2  0  CE
>> 67  2  0  CE
>> 68  2  0  CE
>> 69  2  0  CF
>> 70  2  0  CF
>> 71  2  0  CF
>> 72  2  0  CF
>> 73  2  0  DE
>> 74  2  0  DE
>> 75  2  0  DE
>> 76  2  0  DE
>> 77  2  0  DF
>> 78  2  0  DF
>> 79  2  0  DF
>> 80  2  0  DF
>> 81  2  0  EF
>> 82  2  0  EF
>> 83  2  0  EF
>> 84  2  0  EF
>> 85  3  4 ABC
>> 86  3  4 ABC
>> 87  3  4 ABC
>> 88  3  4 ABC
>> 89  3  4 ABD
>> 90  3  4 ABD
>> 91  3  4 ABD
>> 92  3  4 ABD
>> 93  3  4 ABE
>> 94  3  4 ABE
>> 95  3  4 ABE
>> 96  3  4 ABE
>> 97  3  4 ABF
>> 98  3  4 ABF
>> 99  3  4 ABF
>> 100 3  4 ABF
>> 101 3  4 ACD
>> 102 3  4 ACD
>> 103 3  4 ACD
>> 104 3  4 ACD
>> 105 3  4 ACE
>> 106 3  4 ACE
>> 107 3  4 ACE
>> 108 3  4 ACE
>> 109 3  4 ACF
>> 110 3  4 ACF
>> 111 3  4 ACF
>> 112 3  4 ACF
>> 113 3  4 ADE
>> 114 3  4 ADE
>> 115 3  4 ADE
>> 116 3  4 ADE
>> 117 3  4 ADF
>> 118 3  4 ADF
>> 119 3  4 ADF
>> 120 3  4 ADF
>> 121 3  4 AEF
>> 122 3  4 AEF
>> 123 3  4 AEF
>> 124 3  4 AEF
>> 125 3  0 BCD
>> 126 3  0 BCD
>> 127 3  0 BCD
>> 128 3  0 BCD
>> 129 3  0 BCE
>> 130 3  0 BCE
>> 131 3  0 BCE
>> 132 3  0 BCE
>> 133 3  0 BCF
>> 134 3  0 BCF
>> 135 3  0 BCF
>> 136 3  0 BCF
>> 137 3  0 BDE
>> 138 3  0 BDE
>> 139 3  0 BDE
>> 140 3  0 BDE
>> 141 3  0 BDF
>> 142 3  0 BDF
>> 143 3  0 BDF
>> 144 3  0 BDF
>> 145 3  0 BEF
>> 146 3  0 BEF
>> 147 3  

Re: [R] frequency of items

2016-07-20 Thread Ulrik Stervbo
What you show cannot be a data.frame. Using what you gave, this should help
you along:

x <- c(11,15,12,25, 11,12, 15,25, 134,45,56, 46, 45,56, 15,12,
66,45,56,24,14,11,25,12,134)
table(x)

On Wed, 20 Jul 2016 at 11:44 Jim Lemon  wrote:

> Oops, didn't translate that function correctly:
>
> has_values<-function(x,values) {
>  if(is.list(x)) {
>   return(sum(unlist(lapply(svlist,
>function(x,values) return(all(values %in% x)),values
>  }
> }
>
> Jim
>
> On Wed, Jul 20, 2016 at 7:18 PM, Jim Lemon  wrote:
> > Hi sri,
> > Maybe something like this?
> >
> > has_values<-function(x,values) {
> >  if(is.list(x)) {
> >   return(sum(unlist(lapply(svlist,
> >function(x,values) return(all(values %in% x)),c(11,12)
> >  }
> > }
> >
> > svlist<-list(a=c(11,15,12,25),
> >  b=c(11,12),
> >  c=c(15,25),
> >  d=c(134,45,56),
> >  e=46,
> >  f=c(45,56),
> >  g=c(15,12),
> >  h=c(66,45,56,24,14,11,25,12,134))
> >
> > has_values(svlist,c(11,12))
> >
> > Jim
> >
> > On Tue, Jul 19, 2016 at 8:59 PM, sri vathsan 
> wrote:
> >> Hi,
> >>
> >> I have a data frame like below.
> >> 11,15,12,25
> >> 11,12
> >> 15,25
> >> 134,45,56
> >> 46
> >> 45,56
> >> 15,12
> >> 66,45,56,24,14,11,25,12,134
> >>
> >> I want to identify the frequency of pairs/triplets or higher that
> occurs in
> >> the data. Say for example, in above data the occurrence of pairs looks
> like
> >> below
> >>
> >> item No of occurrence
> >> 11,12 3
> >> 11,25 2
> >> 15,12 2
> >> 15,25 2
> >> .
> >> .
> >> 45,56  3
> >> 134,45,562
> >>
> >>  and so on
> >>
> >> I am trying to write R code for the above and I am finding difficulty to
> >> approach this. Looking forward some help.
> >>
> >> Thanks!
> >>
> >> --
> >>
> >> Regards,
> >> Srivathsan.K
> >>
> >> [[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.
>

[[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] Build command in library(devtools)

2016-07-20 Thread Duncan Murdoch

On 19/07/2016 10:06 PM, Steven Yen wrote:

Thanks. I found the reason was Rtools does not run under the new version
of R. I had to go back to as early as R 3.0.2 (September 2013) to make
Rtools work.
Any idea for a go-around? Thanks.


Which version of Rtools are you using?  Current Rtools is used to build 
current R (and all of its packages), so of course it works there (though 
we may not have tested on the latest version of Windows, and devtools is 
its own project, unrelated to Rtools).


Duncan Murdoch



On 7/19/2016 4:38 PM, John McKown wrote:

On Tue, Jul 19, 2016 at 3:15 PM, Steven Yen >wrote:

I recently updated my R and RStudio to the latest version and now the
binary option in the "build" command in devtools stops working.

I went around and used the binary=F option which worked by I get the
.tar.gz file instead of the .zip file which I prefer.

Does anyone understand the following error message:

status 127
running 'zip' failed


​I'm not totally sure, but I think that means that R cannot find the
"zip" program in order to run it. ​


===
setwd("A:/R/yenlib/"); library(devtools)
#build("yenlib",binary=T) # Thisfailed with an error message
build("yenlib",binary=F) # This works

 > build("yenlib",binary=T)
"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" --no-site-file  \
   --no-environ --no-save --no-restore --quiet CMD INSTALL \
   "A:\R\yenlib\yenlib" --build

* installing to library
'C:/Users/syen01/AppData/Local/Temp/Rtmp8A7KEw/temp_libpath4074149a528e'
* installing *source* package 'yenlib' ...
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* MD5 sums
Warning: running command '"zip" -r9Xq "A:/R/yenlib/yenlib_16.3.zip"
yenlib' had status 127
running 'zip' failed
* DONE (yenlib)
[1] "A:/R/yenlib/yenlib_16.3.zip"
 >


[[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.




--
"Worry was nothing more than paying interest on a loan that a man may
never borrow"

From: "Quest for the White Wind" by Alan Black

Maranatha! <><
John McKown



[[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] Solicitud de curso ad-hoc de R

2016-07-20 Thread Pedro Concejero Cerezo
Hola
En la asociacion R-hispano mantenemos una pagina con informacion de cursos 
tanto presenciales como 'on-line':

http://r-es.org/category/formacion/

Ademas de las sugerencias que te lleguen por la lista podras encontrar tanto 
empresas como universidades que dan este tipo de formacion.

En cuanto a los recursos 'on-line' te podemos recomendar estos:
http://r-es.org/2016/04/25/curso-datacamp-gratuito-y-en-espanol-introduccion-a-r/
http://r-es.org/2016/03/22/video-tutoriales-de-r-y-r-commander-de-la-universidad-miguel-hernandez/
http://r-es.org/2016/03/15/coursera-en-espanol-de-introduccion-a-la-programacion-estadistica-con-r/

y tienes una lista completa aqui:
http://r-es.org/2016/02/12/cursos-masivos-y-otra-formacion-on-line-sobre-r/

Por favor si veis que alguno de estos recursos *no* esta disponible o hay 
errores, avisadnos para actualizar la lista

Saludos
(Sin acentos con toda la intencion, no se que hace el gestor de listas que 
destroza los mensajes con acentos)

--
Pedro Concejero
E-mail: 
pedro.concejerocer...@telefonica.com
skype: pedro.concejero
twitter @ConcejeroPedro
linkedin pedroconcejero
Entusiasta R, me encontrar�is aqu� gRupo R madRid 




Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener informaci�n privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilizaci�n, divulgaci�n y/o copia sin 
autorizaci�n puede estar prohibida en virtud de la legislaci�n vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma v�a y proceda a su destrucci�n.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinat�rio, pode 
conter informa��o privilegiada ou confidencial e � para uso exclusivo da pessoa 
ou entidade de destino. Se n�o � vossa senhoria o destinat�rio indicado, fica 
notificado de que a leitura, utiliza��o, divulga��o e/ou c�pia sem autoriza��o 
pode estar proibida em virtude da legisla��o vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destrui��o

[[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] frequency of items

2016-07-20 Thread Jim Lemon
Oops, didn't translate that function correctly:

has_values<-function(x,values) {
 if(is.list(x)) {
  return(sum(unlist(lapply(svlist,
   function(x,values) return(all(values %in% x)),values
 }
}

Jim

On Wed, Jul 20, 2016 at 7:18 PM, Jim Lemon  wrote:
> Hi sri,
> Maybe something like this?
>
> has_values<-function(x,values) {
>  if(is.list(x)) {
>   return(sum(unlist(lapply(svlist,
>function(x,values) return(all(values %in% x)),c(11,12)
>  }
> }
>
> svlist<-list(a=c(11,15,12,25),
>  b=c(11,12),
>  c=c(15,25),
>  d=c(134,45,56),
>  e=46,
>  f=c(45,56),
>  g=c(15,12),
>  h=c(66,45,56,24,14,11,25,12,134))
>
> has_values(svlist,c(11,12))
>
> Jim
>
> On Tue, Jul 19, 2016 at 8:59 PM, sri vathsan  wrote:
>> Hi,
>>
>> I have a data frame like below.
>> 11,15,12,25
>> 11,12
>> 15,25
>> 134,45,56
>> 46
>> 45,56
>> 15,12
>> 66,45,56,24,14,11,25,12,134
>>
>> I want to identify the frequency of pairs/triplets or higher that occurs in
>> the data. Say for example, in above data the occurrence of pairs looks like
>> below
>>
>> item No of occurrence
>> 11,12 3
>> 11,25 2
>> 15,12 2
>> 15,25 2
>> .
>> .
>> 45,56  3
>> 134,45,562
>>
>>  and so on
>>
>> I am trying to write R code for the above and I am finding difficulty to
>> approach this. Looking forward some help.
>>
>> Thanks!
>>
>> --
>>
>> Regards,
>> Srivathsan.K
>>
>> [[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.


[R] readline issue with 3.3.1

2016-07-20 Thread Ralf Goertz
Hi,

after a recent update to version 3.3.1 on Opensuse Leap I have problems
with command lines longer than the terminal width. E.g. when I do this

> print("This is a very long line which is in fact 
so long that it gets wrapped while writing it")

and then hit enter I end up with:

> print("This is a very long line which is in fact 
[1] "This is a very long line which is in fact so l
ong that it gets wrapped while writing it"


So the output overwrites the second line of input. This does not happen
when I start R without readline support using "R --no-readline". That's
why I thought it could be a readline problem. But my current readline6
version (6.2) was installed way before the update of R and I had no
problems with the previous R version. Furthermore no other program using
readline seems to have that problem. E.g. in bash:

me@host:~/some/dir> echo This is a very long line which is in fact 
so long that it gets wrapped while writing it
This is a very long line which is in fact so long that it gets wrapped whi
le writing it

__
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] frequency of items

2016-07-20 Thread Jim Lemon
Hi sri,
Maybe something like this?

has_values<-function(x,values) {
 if(is.list(x)) {
  return(sum(unlist(lapply(svlist,
   function(x,values) return(all(values %in% x)),c(11,12)
 }
}

svlist<-list(a=c(11,15,12,25),
 b=c(11,12),
 c=c(15,25),
 d=c(134,45,56),
 e=46,
 f=c(45,56),
 g=c(15,12),
 h=c(66,45,56,24,14,11,25,12,134))

has_values(svlist,c(11,12))

Jim

On Tue, Jul 19, 2016 at 8:59 PM, sri vathsan  wrote:
> Hi,
>
> I have a data frame like below.
> 11,15,12,25
> 11,12
> 15,25
> 134,45,56
> 46
> 45,56
> 15,12
> 66,45,56,24,14,11,25,12,134
>
> I want to identify the frequency of pairs/triplets or higher that occurs in
> the data. Say for example, in above data the occurrence of pairs looks like
> below
>
> item No of occurrence
> 11,12 3
> 11,25 2
> 15,12 2
> 15,25 2
> .
> .
> 45,56  3
> 134,45,562
>
>  and so on
>
> I am trying to write R code for the above and I am finding difficulty to
> approach this. Looking forward some help.
>
> Thanks!
>
> --
>
> Regards,
> Srivathsan.K
>
> [[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] frequency of items

2016-07-20 Thread Michael Dewey
It seems very unlikely that what you quote can be a data frame. It could 
be a list I suppose. Can you clarify?


On 19/07/2016 11:59, sri vathsan wrote:

Hi,

I have a data frame like below.
11,15,12,25
11,12
15,25
134,45,56
46
45,56
15,12
66,45,56,24,14,11,25,12,134

I want to identify the frequency of pairs/triplets or higher that occurs in
the data. Say for example, in above data the occurrence of pairs looks like
below

item No of occurrence
11,12 3
11,25 2
15,12 2
15,25 2
.
.
45,56  3
134,45,562

 and so on

I am trying to write R code for the above and I am finding difficulty to
approach this. Looking forward some help.

Thanks!



--
Michael
http://www.dewey.myzen.co.uk/home.html

__
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] documenting R reference class methods with roxygen2

2016-07-20 Thread Witold E Wolski
I would like to document function arguments in R reference classes and
I do not know how.

I know that methods description can be provided by adding
a string below the function declaration. But how to document the
function arguments in similar fashion like the arguments of R
functions (which can be documented with @param).

Thank you.

PS. Sorry if for some this question is off topic but I did not found a
mailing list dedicated to roxygen2.



-- 
Witold Eryk Wolski

__
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] txtProgressBar()

2016-07-20 Thread Ivan Calandra

Dear useRs,

In a script that will be source()d, I want to install the uninstalled 
packages and follow the progression with a bar. So I looked at 
txtProgressBar() but I cannot figure out how to use it to show the 
progression of the installation.


All the examples I have found just display the progress of... the 
progress bar itself ?


Any idea?

Thanks in advance,
Ivan

--
Ivan Calandra, PhD
Scientific Mediator
University of Reims Champagne-Ardenne
GEGENAA - EA 3795
CREA - 2 esplanade Roland Garros
51100 Reims, France
+33(0)3 26 77 36 89
ivan.calan...@univ-reims.fr
--
https://www.researchgate.net/profile/Ivan_Calandra
https://publons.com/author/705639/

__
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.