Re: [R] Output In R

2015-08-21 Thread Shivi82
Thanks Jeff, this is helpful. 
The reason i am curious to know this is because I have worked for a long
duration in SAS where in it gives us the flexibility to create a data set of
our analysis and then we can easily detail out the same to the end user.

In R seems like View or Sweave  or Shiny are the alternative.




--
View this message in context: 
http://r.789695.n4.nabble.com/Output-In-R-tp4711227p4711368.html
Sent from the R help mailing list archive at Nabble.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] fill color in boxplot and change number in scale

2015-08-21 Thread ELAD LAZAR
I want to change the numbers in scale Y to c(0,-2.5) from (0,-10) only.

and I want to change the color green to yellow and blue to green in the
boxplot.

Thank you

On Fri, Aug 21, 2015 at 6:28 PM, John Kane [via R] <
ml-node+s789695n471135...@n4.nabble.com> wrote:

> Would this help on colour?
>
> http://stackoverflow.com/questions/8320462/ggplot2-how-to-adjust-fill-colour-in-a-boxplot-and-change-legend-text
>
> You don't say what you want to with the numbers in scale (what scale?)
> You might want to try something like ?scale_manual and then do some
> googling.
>
> Note almost all the code you provided is redundent for the problem. We
> probably should have the data however . See ?dput or read ttp://
> stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
> and/or  http://adv-r.had.co.nz/Reproducibility.html for some hints on how
> to frame the question and supply data.
>
>
>
> John Kane
> Kingston ON Canada
>
>
> > -Original Message-
> > From: [hidden email]
> 
> > Sent: Fri, 21 Aug 2015 14:10:23 +0300
> > To: [hidden email]
> 
> > Subject: [R] fill color in boxplot and change number in scale
> >
> > hello,
> > I want to change the line color and/or fill of each boxplot and  change
> > number in scale
> > what I need to do?
> >
> >
> > ylim<-c(-3,0.5)
> > data.for.plot<-data.frame(accelaration=data_2$lag1min_accelaration,
> >   lag=1,
> >   alert='red')
> > data.for.plot<-rbind(data.for.plot,
> >   data.frame(accelaration=data_2$min_accelaration,
> >   lag=0,
> >   alert='red'))
> >
> > data.for.plot<-rbind(data.for.plot,
> >
> > data.frame(accelaration=data_1$lag1min_accelaration,
> >   lag=1,
> >   alert='yellow'))
> > data.for.plot<-rbind(data.for.plot,
> >  data.frame(accelaration=data_1$min_accelaration,
> > lag=0,
> > alert='yellow'))
> >
> > data.for.plot<-rbind(data.for.plot,
> >   data.frame(accelaration=data_0$lag1min_accelaration,
> >  lag=1,
> >  alert='no alert'))
> > data.for.plot<-rbind(data.for.plot,
> >  data.frame(accelaration=data_0$min_accelaration,
> > lag=0,
> > alert='no alert'))
> > library('ggplot2')
> > ggplot(data.for.plot,aes(fill=factor(alert),
> >  y=accelaration,x=factor(lag)))+
> >   geom_boxplot()
> > __
> > [hidden email] 
> 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.
>
> 
> FREE ONLINE PHOTOSHARING - Share your photos online with your friends and
> family!
> Visit http://www.inbox.com/photosharing to find out more!
>
> __
> [hidden email] 
> 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.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/fill-color-in-boxplot-and-change-number-in-scale-tp4711348p4711353.html
> To start a new topic under R help, email
> ml-node+s789695n789696...@n4.nabble.com
> To unsubscribe from R help, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://r.789695.n4.nabble.com/fill-color-in-boxplot-and-change-number-in-scale-tp4711348p4711364.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz

Re: [R] Error in dis[sppInSample, sppInSample]:subscript out of bounds

2015-08-21 Thread Andrew Park
I'm pretty sure you are using the package Picante. When I received the error
you described in my own project, it was due to the naming of species in the
community matrix and the phylogenetic tree being slightly different (one
separated latin binomials with a space, the other with an underscore). When
I corrected one set of names (using gsub) to be identical to the other then
the error went away. I hope this helps.



--
View this message in context: 
http://r.789695.n4.nabble.com/Error-in-dis-sppInSample-sppInSample-subscript-out-of-bounds-tp4705418p4711366.html
Sent from the R help mailing list archive at Nabble.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] accessing CRAN through a proxy on 3.2.2

2015-08-21 Thread jim holtman
Thanks.  I did find out that for my work environment if I use

setInternet(FALSE)

then everything seems to work again.  They changed the default to TRUE in
3.2.2 and that must have been causing the problem.


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

On Fri, Aug 21, 2015 at 2:55 PM, Michael Weylandt <
michael.weyla...@gmail.com> wrote:

> On Fri, Aug 21, 2015 at 12:00 PM, jim holtman  wrote:
> > With the previous versions of R (my latest is 3.2.1) I have had no
> problem
> > getting through the proxy for the firewall at work.  I installed the
> latest
> > version (3.2.2) and now cannot get through the firewall.  There is the
> > session:
> >
> > R version 3.2.2 (2015-08-14) -- "Fire Safety"
> > Copyright (C) 2015 The R Foundation for Statistical Computing
> > Platform: x86_64-w64-mingw32/x64 (64-bit)
> > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > You are welcome to redistribute it under certain conditions.
> > Type 'license()' or 'licence()' for distribution details.
> >   Natural language support but running in an English locale
> > R is a collaborative project with many contributors.
> > Type 'contributors()' for more information and
> > 'citation()' on how to cite R or R packages in publications.
> > Type 'demo()' for some demos, 'help()' for on-line help, or
> > 'help.start()' for an HTML browser interface to help.
> > Type 'q()' to quit R.
> >> Sys.setenv(http_proxy = "http://10.254.16.12:3128/";, http_proxy_user =
> > "ask")
> >> utils:::menuInstallPkgs()
> > --- Please select a CRAN mirror for use in this session ---
> > Error in download.file(url, destfile = f, quiet = TRUE) :
> >   cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'
> > In addition: Warning message:
> > In download.file(url, destfile = f, quiet = TRUE) :
> >   cannot open: HTTP status was '407 Proxy Authentication Required'
> > Warning: unable to access index for repository
> > https://rweb.crmda.ku.edu/cran/src/contrib
> > Warning: unable to access index for repository
> > http://www.stats.ox.ac.uk/pub/RWin/src/contrib
> > Error in install.packages(NULL, .libPaths()[1L], dependencies = NA, type
> =
> > type) :
> >   no packages were specified
> >> sessionInfo()
> > R version 3.2.2 (2015-08-14)
> > Platform: x86_64-w64-mingw32/x64 (64-bit)
> > Running under: Windows 7 x64 (build 7601) Service Pack 1
> > locale:
> > [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> > States.1252
> > [3] LC_MONETARY=English_United States.1252
> > LC_NUMERIC=C
> > [5] LC_TIME=English_United States.1252
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods   base
> > loaded via a namespace (and not attached):
> > [1] tools_3.2.2
> >>
> >
> > I was running with "--vanilla" on the RGUI.  I have seen that there were
> > some other people having issues with 3.2.2 and proxies.  Is there a fix
> out
> > there, or are there some other options I need to setup for 3.2.2 to
> access
> > through a proxy?
>
> Try setInternet2() (or the equivalent command line flag).
>
> Michael
>

[[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] accessing CRAN through a proxy on 3.2.2

2015-08-21 Thread Michael Weylandt
On Fri, Aug 21, 2015 at 12:00 PM, jim holtman  wrote:
> With the previous versions of R (my latest is 3.2.1) I have had no problem
> getting through the proxy for the firewall at work.  I installed the latest
> version (3.2.2) and now cannot get through the firewall.  There is the
> session:
>
> R version 3.2.2 (2015-08-14) -- "Fire Safety"
> Copyright (C) 2015 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>   Natural language support but running in an English locale
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>> Sys.setenv(http_proxy = "http://10.254.16.12:3128/";, http_proxy_user =
> "ask")
>> utils:::menuInstallPkgs()
> --- Please select a CRAN mirror for use in this session ---
> Error in download.file(url, destfile = f, quiet = TRUE) :
>   cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'
> In addition: Warning message:
> In download.file(url, destfile = f, quiet = TRUE) :
>   cannot open: HTTP status was '407 Proxy Authentication Required'
> Warning: unable to access index for repository
> https://rweb.crmda.ku.edu/cran/src/contrib
> Warning: unable to access index for repository
> http://www.stats.ox.ac.uk/pub/RWin/src/contrib
> Error in install.packages(NULL, .libPaths()[1L], dependencies = NA, type =
> type) :
>   no packages were specified
>> sessionInfo()
> R version 3.2.2 (2015-08-14)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 7 x64 (build 7601) Service Pack 1
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
> [3] LC_MONETARY=English_United States.1252
> LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
> loaded via a namespace (and not attached):
> [1] tools_3.2.2
>>
>
> I was running with "--vanilla" on the RGUI.  I have seen that there were
> some other people having issues with 3.2.2 and proxies.  Is there a fix out
> there, or are there some other options I need to setup for 3.2.2 to access
> through a proxy?

Try setInternet2() (or the equivalent command line flag).

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.


Re: [R] Generalised poisson regression

2015-08-21 Thread David Winsemius

On Aug 21, 2015, at 5:22 AM, Babatunde Yakub via R-help wrote:

> I want to know how to extract or obtain the deviance for a fitted generalised 
> poisson regression model. Thanks in advance

If you post the code and some sample data, for building such a model, I'm sure 
someone can help you extract the deviance. If you simply mean what is returned 
by an ordinary glm-call with family="poisson" then deviance should be one of 
the elements of the glm-object.


object$deviance

>   [[alternative HTML version deleted]]

When you do reply (if needed) please send in plain text rather than HTML.

-- 
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] glm help

2015-08-21 Thread David Winsemius
.csv format is still not accepted by the server. When I say it needs to be a 
.txt file   I mean it it needs to be a .txt file. You need to change its 
extension to .txt to prevent your mail client from labeling it as csv which is 
a different type even though I, too, would have thought they should both be 
accepted.

I do now see that the last argument to cbind was a dataframe and Bert's 
comments there were correct. I did not see that tiny little `my4s` way out at 
at the end of all those other arguments. 
-- 
David.

On Aug 21, 2015, at 10:06 AM, Joaquín Aldabe wrote:

> Thanks. Here is in csv format.
> Cheers,
> Joaquín.
> 
> 2015-08-21 12:49 GMT-03:00 Don McKenzie :
> 
>> You can save to .csv from OpenOffice.
>> 
>> Sent from my iPad
>> 
>>> On Aug 21, 2015, at 4:45 AM, Joaquín Aldabe 
>> wrote:
>>> 
>>> Thankyou all by the comments and sorry for not sending in the adequate
>>> format. I don't have the chance to make txt archives as open office
>> doesn't
>>> do it. I'm attaching the data in excel. Please let me know if this is ok.
>>> 
>>> The graph that is wierd to me is the BBSA vs AMGP. It is supposed that
>> AMGP
>>> has a positive effect on BBSA, but the model fit shows a negative slope.
>> In
>>> other forum I was told to plot each variable with fixed values of the
>> other
>>> two variables, and make different curves for each variable.
>>> 
>>> Thanks again for your interest and help.
>>> 
>>> All the best,
>>> Joaquín
>>> 
>>> 2015-08-19 12:54 GMT-03:00 Joaquín Aldabe :
>>> 
 Dear All, I´m running a glm with poisson errors and have a doubt when
 ploting the predicted values. One of my variables has a positive slope
>> in
 the summary output, but when I plot the predicted values on the original
 plot it draws a line with negative slope. I appreciate your comments on
 this and any other aspect of the analysis.
 
 Attached is the script and data in different formats just in case.
 
 Thanks in advanced,
 
 Joaquín.
 
 
 --
 *Joaquín Aldabe*
 
 *Grupo Biodiversidad, Ambiente y Sociedad*
 Centro Universitario de la Región Este, Universidad de la República
 Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
 
 *Departamento de Conservación*
 Aves Uruguay
 BirdLife International
 Canelones 1164, Montevideo
 
 https://sites.google.com/site/joaquin.aldabe
 
 
 
>>> 
>>> 
>>> --
>>> *Joaquín Aldabe*
>>> 
>>> *Grupo Biodiversidad, Ambiente y Sociedad*
>>> Centro Universitario de la Región Este, Universidad de la República
>>> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
>>> 
>>> *Departamento de Conservación*
>>> Aves Uruguay
>>> BirdLife International
>>> Canelones 1164, Montevideo
>>> 
>>> https://sites.google.com/site/joaquin.aldabe
>>> 
>>> __
>>> 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.
>> 
> 
> 
> 
> -- 
> *Joaquín Aldabe*
> 
> *Grupo Biodiversidad, Ambiente y Sociedad*
> Centro Universitario de la Región Este, Universidad de la República
> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
> 
> *Departamento de Conservación*
> Aves Uruguay
> BirdLife International
> Canelones 1164, Montevideo
> 
> https://sites.google.com/site/joaquin.aldabe
> 
> __
> 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] glm help

2015-08-21 Thread Joaquín Aldabe
Thanks. Here is in csv format.
Cheers,
Joaquín.

2015-08-21 12:49 GMT-03:00 Don McKenzie :

> You can save to .csv from OpenOffice.
>
> Sent from my iPad
>
> > On Aug 21, 2015, at 4:45 AM, Joaquín Aldabe 
> wrote:
> >
> > Thankyou all by the comments and sorry for not sending in the adequate
> > format. I don't have the chance to make txt archives as open office
> doesn't
> > do it. I'm attaching the data in excel. Please let me know if this is ok.
> >
> > The graph that is wierd to me is the BBSA vs AMGP. It is supposed that
> AMGP
> > has a positive effect on BBSA, but the model fit shows a negative slope.
> In
> > other forum I was told to plot each variable with fixed values of the
> other
> > two variables, and make different curves for each variable.
> >
> > Thanks again for your interest and help.
> >
> > All the best,
> > Joaquín
> >
> > 2015-08-19 12:54 GMT-03:00 Joaquín Aldabe :
> >
> >> Dear All, I´m running a glm with poisson errors and have a doubt when
> >> ploting the predicted values. One of my variables has a positive slope
> in
> >> the summary output, but when I plot the predicted values on the original
> >> plot it draws a line with negative slope. I appreciate your comments on
> >> this and any other aspect of the analysis.
> >>
> >> Attached is the script and data in different formats just in case.
> >>
> >> Thanks in advanced,
> >>
> >> Joaquín.
> >>
> >>
> >> --
> >> *Joaquín Aldabe*
> >>
> >> *Grupo Biodiversidad, Ambiente y Sociedad*
> >> Centro Universitario de la Región Este, Universidad de la República
> >> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
> >>
> >> *Departamento de Conservación*
> >> Aves Uruguay
> >> BirdLife International
> >> Canelones 1164, Montevideo
> >>
> >> https://sites.google.com/site/joaquin.aldabe
> >> 
> >>
> >>
> >
> >
> > --
> > *Joaquín Aldabe*
> >
> > *Grupo Biodiversidad, Ambiente y Sociedad*
> > Centro Universitario de la Región Este, Universidad de la República
> > Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
> >
> > *Departamento de Conservación*
> > Aves Uruguay
> > BirdLife International
> > Canelones 1164, Montevideo
> >
> > https://sites.google.com/site/joaquin.aldabe
> > 
> > __
> > 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.
>



-- 
*Joaquín Aldabe*

*Grupo Biodiversidad, Ambiente y Sociedad*
Centro Universitario de la Región Este, Universidad de la República
Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha

*Departamento de Conservación*
Aves Uruguay
BirdLife International
Canelones 1164, Montevideo

https://sites.google.com/site/joaquin.aldabe

__
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] accessing CRAN through a proxy on 3.2.2

2015-08-21 Thread jim holtman
With the previous versions of R (my latest is 3.2.1) I have had no problem
getting through the proxy for the firewall at work.  I installed the latest
version (3.2.2) and now cannot get through the firewall.  There is the
session:

R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
  Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> Sys.setenv(http_proxy = "http://10.254.16.12:3128/";, http_proxy_user =
"ask")
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
  cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
  cannot open: HTTP status was '407 Proxy Authentication Required'
Warning: unable to access index for repository
https://rweb.crmda.ku.edu/cran/src/contrib
Warning: unable to access index for repository
http://www.stats.ox.ac.uk/pub/RWin/src/contrib
Error in install.packages(NULL, .libPaths()[1L], dependencies = NA, type =
type) :
  no packages were specified
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252
LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base
loaded via a namespace (and not attached):
[1] tools_3.2.2
>

I was running with "--vanilla" on the RGUI.  I have seen that there were
some other people having issues with 3.2.2 and proxies.  Is there a fix out
there, or are there some other options I need to setup for 3.2.2 to access
through a proxy?


Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do 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] Output In R

2015-08-21 Thread Jeff Newmiller
You really should not be using the console as a way to transfer large amounts 
of data. CSV files are much better, because sane people don't spend their time 
looking through thousands of rows of data. You should be giving the data to 
users in a form where they can filter it down for their needs, or better yet 
you should be filtering it for them to obtain more focused results. 

If you won't be dissuaded from dumping this data on people then Sweave and 
rmarkdown can be used for making large tables. The nuts and bolts of those 
tools are not really on topic here because they involve only a very little R 
but mostly need skills in LaTeX or HTML/CSS respectively.
---
Jeff NewmillerThe .   .  Go Live...
DCN:Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

On August 20, 2015 10:25:18 PM PDT, Shivi82  wrote:
>Hi Jim,
>
>Please see the sample code:
>ak<-read.csv("June.csv", header = TRUE)
>ak%>%select(sfxcode,mod,chargedweight)%>%filter(mod=='AIR')
>
>what i am trying to find is selecting the required var and then
>selecting
>only AIR as a mode of transportation from mod.
>I am getting the output but the total rows which fulfil this condition
>is
>10500 where console shows only 3300. 
>I want to share the output i.e. 10500 rows to my business. So want to
>see
>the possible options to share the results with the business. R Markdown
>& R
>Sweave might help - please suggest. 
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Output-In-R-tp4711227p4711335.html
>Sent from the R help mailing list archive at Nabble.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-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] glm help

2015-08-21 Thread Peter Langfelder
Thanks for the correction, I learned something new.

Peter

On Fri, Aug 21, 2015 at 7:32 AM, Bert Gunter  wrote:
> Inline.
>
> -- Bert
> Bert Gunter
>
> "Data is not information. Information is not knowledge. And knowledge
> is certainly not wisdom."
>-- Clifford Stoll
>
>
> On Thu, Aug 20, 2015 at 10:47 PM, Peter Langfelder
>  wrote:
>> On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter  wrote:
>>
 I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was 
 built with `cbind` which would create a matrix (probably a character 
 matrix) rather than a data frame.
>>>
>>> False. There is a data.frame method for cbind that returns a data
>>> frame. Don't know the specifics here, though.
>>>
>>
>> True, but does not apply here, i.e., David is correct. cbind will
>> return a data frame if the first argument is a data frame. In the OP
>> case, the first argument was a vector and hence cbind gives a matrix,
>
> False again.
>
> class(cbind(a=1:5,b=data.frame(a=letters[1:5],b=3:7)))
>
> [1] "data.frame"
>
> ##First argument a vector, but data frame is returned. Please consult
> ?cbind -- especially the data frame section -- for details.
>
> Again, I don't know the specifics here, and you and David may still
> well be right for what the OP did. I am only trying to correct what
> appear to me to be incorrect statements about the data.frame method of
> cbind (or rbind). Apologies if I have misinterpreted.
>
> Cheers,
> Bert
>
>
>
>> of mode "character" if any of the inputs were character. Here's a
>> short demo:
>>
>>> a = data.frame(a1 = 1:10)
>> # First argument a data frame, so the results is also a data frame  :
>>> class(cbind(a, b = 11:20))
>> [1] "data.frame"
>> # First argument is a vector, so the result is a matrix:
>>> class(cbind(a$a1, b = 11:20))
>> [1] "matrix"
>>> mode(cbind(a$a1, b = 11:20))
>> [1] "numeric"
>>> mode(cbind(a$a1, b = letters[11:20]))
>> [1] "character"
>>
>> Peter

__
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] fill color in boxplot and change number in scale

2015-08-21 Thread John Kane
Would this help on colour?
http://stackoverflow.com/questions/8320462/ggplot2-how-to-adjust-fill-colour-in-a-boxplot-and-change-legend-text

You don't say what you want to with the numbers in scale (what scale?)
You might want to try something like ?scale_manual and then do some googling.

Note almost all the code you provided is redundent for the problem. We probably 
should have the data however . See ?dput or read 
ttp://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
 and/or  http://adv-r.had.co.nz/Reproducibility.html for some hints on how to 
frame the question and supply data.



John Kane
Kingston ON Canada


> -Original Message-
> From: eladlaza...@gmail.com
> Sent: Fri, 21 Aug 2015 14:10:23 +0300
> To: r-help@r-project.org
> Subject: [R] fill color in boxplot and change number in scale
> 
> hello,
> I want to change the line color and/or fill of each boxplot and  change
> number in scale
> what I need to do?
> 
> 
> ylim<-c(-3,0.5)
> data.for.plot<-data.frame(accelaration=data_2$lag1min_accelaration,
>   lag=1,
>   alert='red')
> data.for.plot<-rbind(data.for.plot,
>   data.frame(accelaration=data_2$min_accelaration,
>   lag=0,
>   alert='red'))
> 
> data.for.plot<-rbind(data.for.plot,
> 
> data.frame(accelaration=data_1$lag1min_accelaration,
>   lag=1,
>   alert='yellow'))
> data.for.plot<-rbind(data.for.plot,
>  data.frame(accelaration=data_1$min_accelaration,
> lag=0,
> alert='yellow'))
> 
> data.for.plot<-rbind(data.for.plot,
>   data.frame(accelaration=data_0$lag1min_accelaration,
>  lag=1,
>  alert='no alert'))
> data.for.plot<-rbind(data.for.plot,
>  data.frame(accelaration=data_0$min_accelaration,
> lag=0,
> alert='no alert'))
> library('ggplot2')
> ggplot(data.for.plot,aes(fill=factor(alert),
>  y=accelaration,x=factor(lag)))+
>   geom_boxplot()
> __
> 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.


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!

__
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] Conway Maxwell Poisson

2015-08-21 Thread Bert Gunter
?AIC

-- Bert


Bert Gunter

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
   -- Clifford Stoll


On Fri, Aug 21, 2015 at 5:47 AM, Babatunde Yakub via R-help
 wrote:
> I want to know how to extract or compute the AIC and BIC measures of a conway 
> maxwell poisson regression model.Thanks
>
> [[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] [Rmarkdown] html_document - custom CSS for code snippets

2015-08-21 Thread Duncan Murdoch
On 21/08/2015 9:38 AM, Omar André Gonzáles Díaz wrote:
> Hi Community,
> 
> I'm using custom CSS to modify my html_document, genereted using knirt.
> 
> According to this page:
> 
> http://rmarkdown.rstudio.com/html_document_format.html
> 
> I have to turn off: 1) theme: null  and 2) highlight: null. And use:
> 3) css: my_styles.css (my css document).
>
> I've achieved to use some html tags, like  to give some
> left margin to the document. But i cannot apply correctly html tags to
> the code snipets, and convert it's background to gray.
> 
> So my code snipets show the code, but the background is white, and has
> no difference with the white background of the page.
> 
> What can i do?
> 
> *Extra: Now i'm displaying some R code, but i would like to display
> also some javascript code. Is this possible?

Sure, just enter it as

```
x = 1;
for (var i=0; i<2; i++)
```

You won't get syntax highlighting; if you want that, you'll need to
create a "Javascript engine"; see ?knitr::knit_engines, or use a
different one (the "coffee" engine is probably fine):

```{coffee, eval=FALSE}
x = 1;
for (var i=0; i<2; i++)
```

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] Conway Maxwell Poisson

2015-08-21 Thread Babatunde Yakub via R-help
I want to know how to extract or compute the AIC and BIC measures of a conway 
maxwell poisson regression model.Thanks

[[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] glm help

2015-08-21 Thread Joaquín Aldabe
Thankyou all by the comments and sorry for not sending in the adequate
format. I don't have the chance to make txt archives as open office doesn't
do it. I'm attaching the data in excel. Please let me know if this is ok.

The graph that is wierd to me is the BBSA vs AMGP. It is supposed that AMGP
has a positive effect on BBSA, but the model fit shows a negative slope. In
other forum I was told to plot each variable with fixed values of the other
two variables, and make different curves for each variable.

Thanks again for your interest and help.

All the best,
Joaquín

2015-08-19 12:54 GMT-03:00 Joaquín Aldabe :

> Dear All, I´m running a glm with poisson errors and have a doubt when
> ploting the predicted values. One of my variables has a positive slope in
> the summary output, but when I plot the predicted values on the original
> plot it draws a line with negative slope. I appreciate your comments on
> this and any other aspect of the analysis.
>
> Attached is the script and data in different formats just in case.
>
> Thanks in advanced,
>
> Joaquín.
>
>
> --
> *Joaquín Aldabe*
>
> *Grupo Biodiversidad, Ambiente y Sociedad*
> Centro Universitario de la Región Este, Universidad de la República
> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
>
> *Departamento de Conservación*
> Aves Uruguay
> BirdLife International
> Canelones 1164, Montevideo
>
> https://sites.google.com/site/joaquin.aldabe
> 
>
>


-- 
*Joaquín Aldabe*

*Grupo Biodiversidad, Ambiente y Sociedad*
Centro Universitario de la Región Este, Universidad de la República
Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha

*Departamento de Conservación*
Aves Uruguay
BirdLife International
Canelones 1164, Montevideo

https://sites.google.com/site/joaquin.aldabe

__
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] Newbie question: error message with install.packages

2015-08-21 Thread Peter Wicher
Peter,

Thank you.  I tried a different mirror (in TX) and install.packages(“RWeka”) 
worked.  I really appreciate your help.

Best,

Peter

> On Aug 20, 2015, at 3:06 PM, Peter Langfelder  
> wrote:
> 
> From an older post by Uwe Ligges:
> 
> Anyway: R tried to download the package but got an html page, obviously,
> hence either the mirror you are using is corrupted or someone in between
> (like some proxy?) delivers html pages rather than packages...
> 
> 
> In other words, check your proxy/internet settings, or perhaps try a
> different mirror.
> 
> Peter
> 
> 
> On Thu, Aug 20, 2015 at 10:09 AM, Peter Wicher  wrote:
>> Many thanks.
>> 
>> Yes, I am using the R.app GUI:
>> [R.app GUI 1.66 (6996) x86_64-apple-darwin13.4.0]
>> 
>> 
>> At startup,
>> 
>>> getOption("repos")
>>CRAN
>> "@CRAN@"
>> 
>> Then when attempting again to install RWeka I'm able to select the mirror,
>> and after that the result is the same as yours:
>> 
>>> getOption("repos")
>>   CRAN
>> "https://cran.cnr.Berkeley.edu";
>> 
>> Unfortunately the same error message happens with install.packages, for
>> example:
>>> install.packages("err")
>> Error: Line starting '> 
>> I've confirmed that Java 8 update 60 is correctly loaded.
>> 
>> Interestingly I've loaded R on my Windows machine and this error message
>> doesn't happen, the packages load properly.
>> 
>> Peter
>> 
>> On Wed, Aug 19, 2015 at 11:17 PM, David Winsemius 
>> wrote:
>> 
>>> 
 On Aug 19, 2015, at 9:13 PM, Peter Wicher  wrote:
 
 Hi,
 
 I’m starting to work my way through “Machine Learning With R” by Brett
>>> Lantz.
 
 Running on Mac OS X 10.10.4
 
 I’ve downloaded and installed R and the R Console comes up fine.
 
 Whenever I use the install.packages command, regardless of the package I
>>> get the same error message:
 
> install.packages ("RWeka")
 Error: Line starting '>>> 
 Any idea of what is wrong and how to solve it?
>>> 
>>> Not sure. Have never gotten that error message, and I do use OS X 10.10.3
>>> as well as having very recently updated to R 3.2.2.
>>> 
>>> Are you using the R.app GUI?
>>> 
>>> If so … What do you see when you look at Preference/Startup for the
>>> default CRAN repository?
>>> 
>>> If not … What do you see when you run:
>>> 
>>> getOption("repos”)
>>> 
>>> I get:
>>> 
>>>  CRAN
>>> "http://cran.cnr.Berkeley.edu";
>>> 
>>> 
 
 Thanks!
 
 Peter Wicher
 pjwic...@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.
>>> 
>>> 
>> 
>>[[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] Output In R

2015-08-21 Thread Shivi82
Hi Jim,

Please see the sample code:
ak<-read.csv("June.csv", header = TRUE)
ak%>%select(sfxcode,mod,chargedweight)%>%filter(mod=='AIR')

what i am trying to find is selecting the required var and then selecting
only AIR as a mode of transportation from mod.
I am getting the output but the total rows which fulfil this condition is
10500 where console shows only 3300. 
I want to share the output i.e. 10500 rows to my business. So want to see
the possible options to share the results with the business. R Markdown & R
Sweave might help - please suggest. 



--
View this message in context: 
http://r.789695.n4.nabble.com/Output-In-R-tp4711227p4711335.html
Sent from the R help mailing list archive at Nabble.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] fill color in boxplot and change number in scale

2015-08-21 Thread Elad Lazar
hello,
I want to change the line color and/or fill of each boxplot and  change
number in scale
what I need to do?


ylim<-c(-3,0.5)
data.for.plot<-data.frame(accelaration=data_2$lag1min_accelaration,
  lag=1,
  alert='red')
data.for.plot<-rbind(data.for.plot,
  data.frame(accelaration=data_2$min_accelaration,
  lag=0,
  alert='red'))

data.for.plot<-rbind(data.for.plot,
  data.frame(accelaration=data_1$lag1min_accelaration,
  lag=1,
  alert='yellow'))
data.for.plot<-rbind(data.for.plot,
 data.frame(accelaration=data_1$min_accelaration,
lag=0,
alert='yellow'))

data.for.plot<-rbind(data.for.plot,
  data.frame(accelaration=data_0$lag1min_accelaration,
 lag=1,
 alert='no alert'))
data.for.plot<-rbind(data.for.plot,
 data.frame(accelaration=data_0$min_accelaration,
lag=0,
alert='no alert'))
library('ggplot2')
ggplot(data.for.plot,aes(fill=factor(alert),
 y=accelaration,x=factor(lag)))+
  geom_boxplot()
__
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] Generalised poisson regression

2015-08-21 Thread Babatunde Yakub via R-help
I want to know how to extract or obtain the deviance for a fitted generalised 
poisson regression model. Thanks in advance


[[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] glm help

2015-08-21 Thread Bert Gunter
Inline.

-- Bert
Bert Gunter

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
   -- Clifford Stoll


On Thu, Aug 20, 2015 at 10:47 PM, Peter Langfelder
 wrote:
> On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter  wrote:
>
>>> I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built 
>>> with `cbind` which would create a matrix (probably a character matrix) 
>>> rather than a data frame.
>>
>> False. There is a data.frame method for cbind that returns a data
>> frame. Don't know the specifics here, though.
>>
>
> True, but does not apply here, i.e., David is correct. cbind will
> return a data frame if the first argument is a data frame. In the OP
> case, the first argument was a vector and hence cbind gives a matrix,

False again.

class(cbind(a=1:5,b=data.frame(a=letters[1:5],b=3:7)))

[1] "data.frame"

##First argument a vector, but data frame is returned. Please consult
?cbind -- especially the data frame section -- for details.

Again, I don't know the specifics here, and you and David may still
well be right for what the OP did. I am only trying to correct what
appear to me to be incorrect statements about the data.frame method of
cbind (or rbind). Apologies if I have misinterpreted.

Cheers,
Bert



> of mode "character" if any of the inputs were character. Here's a
> short demo:
>
>> a = data.frame(a1 = 1:10)
> # First argument a data frame, so the results is also a data frame  :
>> class(cbind(a, b = 11:20))
> [1] "data.frame"
> # First argument is a vector, so the result is a matrix:
>> class(cbind(a$a1, b = 11:20))
> [1] "matrix"
>> mode(cbind(a$a1, b = 11:20))
> [1] "numeric"
>> mode(cbind(a$a1, b = letters[11:20]))
> [1] "character"
>
> Peter

__
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] plotting over a raster image with control over location and orientation

2015-08-21 Thread ravi
Hi,I would like to get some help in plotting over an image. I have a png image 
over which I would like to have a plot. I would like to be able to control the 
location, area and orientation of the plot on the image.
I have taken help from the following references 
:http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Murrell.pdfhttp://stackoverflow.com/questions/12918367/in-r-how-to-plot-with-a-png-as-background
In order to give a reproducible example, I set up my image with the help of 
some code from the the first reference above.

#Setting up the initial example raster image
x <- y <- seq(-4*pi, 4*pi, len=27)
r <- sqrt(outer(x^2, y^2, "+"))
z <- cos(r^2)*exp(-r/6)
image <- (z - min(z))/diff(range(z))
step <- diff(x)[1]
xrange <- range(x) + c(-step/2, step/2)
yrange <- range(y) + c(-step/2, step/2)
plot(x, y, ann=FALSE,xlim=xrange, ylim=yrange,xaxs="i", yaxs="i")
rasterImage(image,xrange[1], yrange[1],xrange[2], yrange[2],interpolate=FALSE)

# the explanation of my problem starts here
# First, I want to mark out a particular line
lines(c(10,10.5),c(-10.5,10),col="red",lwd=2)
#In my problem, I have to locate these points graphically from the image
calpoints <- locator(n=2,type='p',pch=4,col='blue',lwd=2)
# this gives the line corresponding to the x-axis for my overlay plot
# I don't want the red line on my plot
#the red line plotted earlier is just to show the example location
newOrigin<-calpoints[1]
xLimit<-calpoints[2]#xlimit marks the limit of the x-axis on the image# on this 
new line as the x-axis, I want to make a new plot# the y-axis should be 
perpendicular to the x-axis. I would like to be able to specify the width of 
coverage over the image#example
xx<-1:10
yy<-xx^2
plot(xx,yy,xlim=range(xx),ylim=range(yy),col="blue",type="b",xlab="x",ylab="square
 of x")
# I would prefer to have the image more transparent just under the x and y 
labels and axis labelsThanks, Ravi


[[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] [Rmarkdown] html_document - custom CSS for code snippets

2015-08-21 Thread Omar André Gonzáles Díaz
Hi Community,

I'm using custom CSS to modify my html_document, genereted using knirt.

According to this page:

http://rmarkdown.rstudio.com/html_document_format.html

I have to turn off: 1) theme: null  and 2) highlight: null. And use:
3) css: my_styles.css (my css document).

I've achieved to use some html tags, like  to give some
left margin to the document. But i cannot apply correctly html tags to
the code snipets, and convert it's background to gray.

So my code snipets show the code, but the background is white, and has
no difference with the white background of the page.

What can i do?

*Extra: Now i'm displaying some R code, but i would like to display
also some javascript code. Is this possible?

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