Re: [R] application of R

2018-01-11 Thread muhammad ramzi
Oh I see thank you very much now I understand. So for me as I am considered an 
intermediate in R and also C++ what kind of programming language I could take 
up and learn to make a commercial statistical software ? Any advices as well ?

> On 12 Jan 2018, at 12:40 PM, Jeff Newmiller  wrote:
> 
> Because many technical people need to accomplish statistical data analysis 
> with computers that depend on existing algorithms applied in new ways, or 
> with new algorithms that are not implemented by commercial software.  Often 
> such people have no desire to provide step-by-step support of their tools for 
> every user of their code indefinitely, so developing commercial software for 
> others is less useful to them than having access to existing software that 
> can be adapted. They often find that allowing others access to their code is 
> a reasonable trade for being able to re-use the work of others before them. 
> 
> You might read the book "The Cathedral and the Bazaar" for more detail about 
> this perspective, but this line of discussion is not really on topic here.
> -- 
> Sent from my phone. Please excuse my brevity.
> 
>> On January 11, 2018 7:09:20 PM PST, muhammad ramzi  
>> wrote:
>> Thank you very much this really helped me a lot . 
>> So actually why would people learn R(other than personal interests ) if
>> you can't really build anything that can be sold ? I'm sorry if I'm
>> asking bad questions 
>> 
>> 
>>> On 12 Jan 2018, at 4:43 AM, Marc Schwartz 
>> wrote:
>>> 
>>> 
>>> 
 On Jan 11, 2018, at 2:15 PM, muhammad ramzi 
>> wrote:
 
 hello guys,
 
 i am a petroleum engineering student and i will be having a long
>> semester
 break and currently i am learning THE R PROGRAMMING LANGUAGE just
>> out of
 interest. I would just like to know if i am able to design a
>> business
 analysis software using R as in create a type of software that can
>> be sold
 to business people. can this be done in R language?
 
 another thing is if i do learn this all the way, what advantages
>> will it
 give me in terms of future prospects and career development?
>>> 
>>> 
>>> Hi,
>>> 
>>> To your first question, as R is open source and released under the
>> GPL, there are legal issues that you will need to consider, which will
>> be specific to the details of your plans, how your "application" is
>> built, how it interacts with R, and importantly, the copying and
>> distribution of the end product.
>>> 
>>> You should, first and foremost, contact a lawyer familiar with open
>> source software, specifically GPL compatible licenses, so that you can
>> get proper legal advice, which you will not get here. You risk
>> legal/financial liabilities down the road if not done in compliance
>> with the license requirements.
>>> 
>>> As a first pass, you should read:
>>> 
>>> 
>> https://cran.r-project.org/doc/FAQ/R-FAQ.html#Can-I-use-R-for-commercial-purposes_003f
>>> 
>>> and
>>> 
>>> https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html
>>> 
>>> so that you can gain initial insights into some of the general
>> implications of building a product for distribution (whether you give
>> it away or sell it) that depends upon a GPL licensed application. 
>>> 
>>> Whether or not there is utility for the application you envision such
>> that people would be willing to pay for it, will depend upon a variety
>> of factors, not the least of which is what competition you face and the
>> value of your planned application over others that are already in the
>> marketplace.
>>> 
>>> To your second question, you are asking a biased, self selected
>> audience. Thus, take that into account for any responses that you may
>> get.
>>> 
>>> The responses relative to advantages are going to be, to some extent,
>> broadly industry specific. That being said, in many domains, knowing R,
>> along with other relevant applications and programming languages can
>> only be beneficial in many cases.
>>> 
>>> R is becoming increasingly popular (e.g. see:
>> https://www.tiobe.com/tiobe-index/). However, depending upon the
>> subject matter domain you will work in and to a large extent, the
>> company or institution you will work for, those factors can have a
>> material influence on the role that R might play in that environment.
>>> 
>>> Others can perhaps chime in with other thoughts and perhaps even
>> industry specific insights for you.
>>> 
>>> 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-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] application of R

2018-01-11 Thread Berend Hasselman

> On 12 Jan 2018, at 04:09, muhammad ramzi  wrote:
> 
> Thank you very much this really helped me a lot . 
> So actually why would people learn R(other than personal interests ) if you 
> can't really build anything that can be sold ? I'm sorry if I'm asking bad 
> questions 
> 


Google with the phrase "opensource why"  and start reading.

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] application of R

2018-01-11 Thread Eric Berger
Marc and Jeff give excellent advice. Since you have a commercial
perspective, here are two more points to consider:
1. There are companies that sell software built on R. For example, the
company Rstudio.com develops both free and "professional" versions of its
products RStudio and Shiny.
2. You ask about selling software. Switch hats and think about buying
software. Some real-world problems can be solved using commercial products
such as Matlab (which costs thousands of dollars.) For some of these
problems, the world of R (and more generally CRAN - the Comprehensive R
Archive Network - https://cran.r-project.org/ - where you can find many of
the freely available R-packages) is a great alternative and it is free.

On Fri, Jan 12, 2018 at 6:40 AM, Jeff Newmiller 
wrote:

> Because many technical people need to accomplish statistical data analysis
> with computers that depend on existing algorithms applied in new ways, or
> with new algorithms that are not implemented by commercial software.  Often
> such people have no desire to provide step-by-step support of their tools
> for every user of their code indefinitely, so developing commercial
> software for others is less useful to them than having access to existing
> software that can be adapted. They often find that allowing others access
> to their code is a reasonable trade for being able to re-use the work of
> others before them.
>
> You might read the book "The Cathedral and the Bazaar" for more detail
> about this perspective, but this line of discussion is not really on topic
> here.
> --
> Sent from my phone. Please excuse my brevity.
>
> On January 11, 2018 7:09:20 PM PST, muhammad ramzi 
> wrote:
> >Thank you very much this really helped me a lot .
> >So actually why would people learn R(other than personal interests ) if
> >you can't really build anything that can be sold ? I'm sorry if I'm
> >asking bad questions
> >
> >
> >> On 12 Jan 2018, at 4:43 AM, Marc Schwartz 
> >wrote:
> >>
> >>
> >>
> >>> On Jan 11, 2018, at 2:15 PM, muhammad ramzi 
> >wrote:
> >>>
> >>> hello guys,
> >>>
> >>> i am a petroleum engineering student and i will be having a long
> >semester
> >>> break and currently i am learning THE R PROGRAMMING LANGUAGE just
> >out of
> >>> interest. I would just like to know if i am able to design a
> >business
> >>> analysis software using R as in create a type of software that can
> >be sold
> >>> to business people. can this be done in R language?
> >>>
> >>> another thing is if i do learn this all the way, what advantages
> >will it
> >>> give me in terms of future prospects and career development?
> >>
> >>
> >> Hi,
> >>
> >> To your first question, as R is open source and released under the
> >GPL, there are legal issues that you will need to consider, which will
> >be specific to the details of your plans, how your "application" is
> >built, how it interacts with R, and importantly, the copying and
> >distribution of the end product.
> >>
> >> You should, first and foremost, contact a lawyer familiar with open
> >source software, specifically GPL compatible licenses, so that you can
> >get proper legal advice, which you will not get here. You risk
> >legal/financial liabilities down the road if not done in compliance
> >with the license requirements.
> >>
> >> As a first pass, you should read:
> >>
> >>
> >https://cran.r-project.org/doc/FAQ/R-FAQ.html#Can-I-use-
> R-for-commercial-purposes_003f
> >>
> >> and
> >>
> >>  https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html
> >>
> >> so that you can gain initial insights into some of the general
> >implications of building a product for distribution (whether you give
> >it away or sell it) that depends upon a GPL licensed application.
> >>
> >> Whether or not there is utility for the application you envision such
> >that people would be willing to pay for it, will depend upon a variety
> >of factors, not the least of which is what competition you face and the
> >value of your planned application over others that are already in the
> >marketplace.
> >>
> >> To your second question, you are asking a biased, self selected
> >audience. Thus, take that into account for any responses that you may
> >get.
> >>
> >> The responses relative to advantages are going to be, to some extent,
> >broadly industry specific. That being said, in many domains, knowing R,
> >along with other relevant applications and programming languages can
> >only be beneficial in many cases.
> >>
> >> R is becoming increasingly popular (e.g. see:
> >https://www.tiobe.com/tiobe-index/). However, depending upon the
> >subject matter domain you will work in and to a large extent, the
> >company or institution you will work for, those factors can have a
> >material influence on the role that R might play in that environment.
> >>
> >> Others can perhaps chime in with other thoughts and perhaps even
> >industry specific 

Re: [R] application of R

2018-01-11 Thread Jeff Newmiller
Because many technical people need to accomplish statistical data analysis with 
computers that depend on existing algorithms applied in new ways, or with new 
algorithms that are not implemented by commercial software.  Often such people 
have no desire to provide step-by-step support of their tools for every user of 
their code indefinitely, so developing commercial software for others is less 
useful to them than having access to existing software that can be adapted. 
They often find that allowing others access to their code is a reasonable trade 
for being able to re-use the work of others before them. 

You might read the book "The Cathedral and the Bazaar" for more detail about 
this perspective, but this line of discussion is not really on topic here.
-- 
Sent from my phone. Please excuse my brevity.

On January 11, 2018 7:09:20 PM PST, muhammad ramzi  wrote:
>Thank you very much this really helped me a lot . 
>So actually why would people learn R(other than personal interests ) if
>you can't really build anything that can be sold ? I'm sorry if I'm
>asking bad questions 
>
>
>> On 12 Jan 2018, at 4:43 AM, Marc Schwartz 
>wrote:
>> 
>> 
>> 
>>> On Jan 11, 2018, at 2:15 PM, muhammad ramzi 
>wrote:
>>> 
>>> hello guys,
>>> 
>>> i am a petroleum engineering student and i will be having a long
>semester
>>> break and currently i am learning THE R PROGRAMMING LANGUAGE just
>out of
>>> interest. I would just like to know if i am able to design a
>business
>>> analysis software using R as in create a type of software that can
>be sold
>>> to business people. can this be done in R language?
>>> 
>>> another thing is if i do learn this all the way, what advantages
>will it
>>> give me in terms of future prospects and career development?
>> 
>> 
>> Hi,
>> 
>> To your first question, as R is open source and released under the
>GPL, there are legal issues that you will need to consider, which will
>be specific to the details of your plans, how your "application" is
>built, how it interacts with R, and importantly, the copying and
>distribution of the end product.
>> 
>> You should, first and foremost, contact a lawyer familiar with open
>source software, specifically GPL compatible licenses, so that you can
>get proper legal advice, which you will not get here. You risk
>legal/financial liabilities down the road if not done in compliance
>with the license requirements.
>> 
>> As a first pass, you should read:
>> 
>> 
>https://cran.r-project.org/doc/FAQ/R-FAQ.html#Can-I-use-R-for-commercial-purposes_003f
>> 
>> and
>> 
>>  https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html
>> 
>> so that you can gain initial insights into some of the general
>implications of building a product for distribution (whether you give
>it away or sell it) that depends upon a GPL licensed application. 
>> 
>> Whether or not there is utility for the application you envision such
>that people would be willing to pay for it, will depend upon a variety
>of factors, not the least of which is what competition you face and the
>value of your planned application over others that are already in the
>marketplace.
>> 
>> To your second question, you are asking a biased, self selected
>audience. Thus, take that into account for any responses that you may
>get.
>> 
>> The responses relative to advantages are going to be, to some extent,
>broadly industry specific. That being said, in many domains, knowing R,
>along with other relevant applications and programming languages can
>only be beneficial in many cases.
>> 
>> R is becoming increasingly popular (e.g. see:
>https://www.tiobe.com/tiobe-index/). However, depending upon the
>subject matter domain you will work in and to a large extent, the
>company or institution you will work for, those factors can have a
>material influence on the role that R might play in that environment.
>> 
>> Others can perhaps chime in with other thoughts and perhaps even
>industry specific insights for you.
>> 
>> 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-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] application of R

2018-01-11 Thread muhammad ramzi
Thank you very much this really helped me a lot . 
So actually why would people learn R(other than personal interests ) if you 
can't really build anything that can be sold ? I'm sorry if I'm asking bad 
questions 


> On 12 Jan 2018, at 4:43 AM, Marc Schwartz  wrote:
> 
> 
> 
>> On Jan 11, 2018, at 2:15 PM, muhammad ramzi  wrote:
>> 
>> hello guys,
>> 
>> i am a petroleum engineering student and i will be having a long semester
>> break and currently i am learning THE R PROGRAMMING LANGUAGE just out of
>> interest. I would just like to know if i am able to design a business
>> analysis software using R as in create a type of software that can be sold
>> to business people. can this be done in R language?
>> 
>> another thing is if i do learn this all the way, what advantages will it
>> give me in terms of future prospects and career development?
> 
> 
> Hi,
> 
> To your first question, as R is open source and released under the GPL, there 
> are legal issues that you will need to consider, which will be specific to 
> the details of your plans, how your "application" is built, how it interacts 
> with R, and importantly, the copying and distribution of the end product.
> 
> You should, first and foremost, contact a lawyer familiar with open source 
> software, specifically GPL compatible licenses, so that you can get proper 
> legal advice, which you will not get here. You risk legal/financial 
> liabilities down the road if not done in compliance with the license 
> requirements.
> 
> As a first pass, you should read:
> 
>  
> https://cran.r-project.org/doc/FAQ/R-FAQ.html#Can-I-use-R-for-commercial-purposes_003f
> 
> and
> 
>  https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html
> 
> so that you can gain initial insights into some of the general implications 
> of building a product for distribution (whether you give it away or sell it) 
> that depends upon a GPL licensed application. 
> 
> Whether or not there is utility for the application you envision such that 
> people would be willing to pay for it, will depend upon a variety of factors, 
> not the least of which is what competition you face and the value of your 
> planned application over others that are already in the marketplace.
> 
> To your second question, you are asking a biased, self selected audience. 
> Thus, take that into account for any responses that you may get.
> 
> The responses relative to advantages are going to be, to some extent, broadly 
> industry specific. That being said, in many domains, knowing R, along with 
> other relevant applications and programming languages can only be beneficial 
> in many cases.
> 
> R is becoming increasingly popular (e.g. see: 
> https://www.tiobe.com/tiobe-index/). However, depending upon the subject 
> matter domain you will work in and to a large extent, the company or 
> institution you will work for, those factors can have a material influence on 
> the role that R might play in that environment.
> 
> Others can perhaps chime in with other thoughts and perhaps even industry 
> specific insights for you.
> 
> 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.


Re: [R] shading (fill) the area between two lines

2018-01-11 Thread Duncan Murdoch

On 11/01/2018 7:43 PM, AbouEl-Makarim Aboueissa wrote:

Dear All:


I am trying to shade the area between the two lines; *line 1* and *line 2*.


The help page for polygon() gives some examples of this.

Duncan Murdoch




You can use this code as an example.


x100<-c(-1,1,2,3,4,5,6,3)
y100<-c(4,5,3,1,4,4,2,-1)

plot(x100,y100)


*#  line1*

abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3,
col="skyblue", lty=3) # lty=3,

*# line 2*

abline(a=-(Beta0+1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3,
col="skyblue", lty=3) # lty=3,




thank you very much for your help
with thanks
abou
__


*AbouEl-Makarim Aboueissa, PhD*

*Professor of Statistics*

*Department of Mathematics and Statistics*
*University of Southern Maine*

[[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] shading (fill) the area between two lines

2018-01-11 Thread AbouEl-Makarim Aboueissa
Dear All:


I am trying to shade the area between the two lines; *line 1* and *line 2*.



You can use this code as an example.


x100<-c(-1,1,2,3,4,5,6,3)
y100<-c(4,5,3,1,4,4,2,-1)

plot(x100,y100)


*#  line1*

abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3,
col="skyblue", lty=3) # lty=3,

*# line 2*

abline(a=-(Beta0+1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3,
col="skyblue", lty=3) # lty=3,




thank you very much for your help
with thanks
abou
__


*AbouEl-Makarim Aboueissa, PhD*

*Professor of Statistics*

*Department of Mathematics and Statistics*
*University of Southern Maine*

[[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] Information installation package sjPlot

2018-01-11 Thread Orvalho Augusto
That is very strange.

I am using Ubuntu 16.04 and managed to install it in less than 5 minutes.

OA

On Wed, Jan 10, 2018 at 12:00 PM, Luca Danieli 
wrote:

> Hi all,
>
> I am new. I am installing the library sjPlot on Ubunto 16.10 and I guess
> it is installing some dependencies. But it is taking more than 1.5 hours,
> is it possible?
>
> It has right now halted (hope momentarily) in installing the package
> 'rstan', particularly the file lang__grammars__statement_grammar_inst.o
>
> Other packages installed include: dygraphs, colourpicker, raster.
>
> Is it good or is something going wrong?
>
> Luca
>
> Get Outlook for Android
>
>
> [[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.


[R] setting constraints on gam

2018-01-11 Thread Alejandra Martínez Blancas
I am fitting a model in which the response variable y is a function of
two independent, quantitative variables x1 and x2; thus: y = f(x1,
x2). For reasons I do not believe to be important for the purpose of
this post, I find it desirable to find f by means of GAM; also, I
require principal effects and interactions to be specified separately,
so I am using using te and ti tensors. Thus, I am using the following
command:



f = gam(y ~ te(x1) + te(x2) + ti(x1, x2))



This results in a model that corresponds to one of the hypotheses I am
testing. Nevertheless, another hypothesis requires that, when one of
the independent variables (say x2) is zero, the value of y is
unaffected by the other variable (in this example x1). In other words
f(x1, 0) = k for every value of x1, where k is a constant to be
estimated. For x2 values other than zero I would like to let GAM
choose the appropriate function relating x1 and y. Is there a way to
specify such model in mgcv?

__
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] Fwd: Time Series with Neural Networks

2018-01-11 Thread Emre Karagülle

> Hi,
> I am would like to ask few questions.
> I am trying to forecast  hourly electricity prices by 24 hours ahead.
> I have hourly data starting from 2015*12*18 to 2017-10-24
> and I have defined the data as time series as written in the code below.
>  
> Then I am trying do neural network with 23 non-seasonal dummies and 1 
> seasonal dummy.
> But I don’t know whether training set is enough.( Guess it is 50 hours in 
> here?)
>  
> The problem is that I couldn’t 24 for output here. How can I make such 
> forecast?
> And my MASE score (6.95 in the Test set) is not good. Could be related to 
> shortness of training set?
>  
> The Code:
>  
> library(zoo)
> library(readxl)
> setwd("C:/Users/emrek/Dropbox/2017-2018 Master Thesis/DATA")
> epias <- read_excel("eski.epias.xlsx")
>  
>  
> nPTF <- epias$`PTF (TL/MWh)`
> nSMF<- epias$`SMF(TL/MWh)`
> nC<- epias$`TT(MWh)`
> nEAK<- epias$`EAK-Toplam (MWh)`
> nTP<- epias$`Toplam (MWh)`
>  
> times <- seq(from=as.POSIXct("2015-12-18 00:00:00"), 
> to=as.POSIXct("2017-10-24 23:00:00"), by="hour")
> mydata <- rnorm(length(times))
>  
> PTF <- zoo(nPTF, order.by=times )
> SMF <- zoo(nSMF, order.by=times )
> C <- zoo(nC, order.by=times )
> EAK <- zoo(nEAK, order.by=times )
> TP<- zoo(nTP, order.by=times )
> SH <- (EAK-TP)
>  
> epias <- cbind(PTF,C,SH)
> View(epias)
>  
> #neural networks
> library(forecast)
> set.seed(201)
> epias.nn <- nnetar(PTF, repeats = 50, p=23, P=1, size =12)
> summary(epias.nn$model[[1]])
>  
> epias.pred <- forecast(epias.nn, h= 24)
> accuracy(epias.pred, 24)
>  
> plot(PTF, ylim=c(0,500) , ylab=  , xlab= , bty="l", xaxt="n", 
> xlim=c(as.POSIXct("2017-10-20 00:00:00"),as.POSIXct("2017-10-25 23:00:00")) , 
> lty=1 )
>  
> lines(epias.pred$fitted,lwd = 2,col="blue")
>  
>  
> Best Regards,
> --
> Emre
>  

[[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] application of R

2018-01-11 Thread Marc Schwartz


> On Jan 11, 2018, at 2:15 PM, muhammad ramzi  wrote:
> 
> hello guys,
> 
> i am a petroleum engineering student and i will be having a long semester
> break and currently i am learning THE R PROGRAMMING LANGUAGE just out of
> interest. I would just like to know if i am able to design a business
> analysis software using R as in create a type of software that can be sold
> to business people. can this be done in R language?
> 
> another thing is if i do learn this all the way, what advantages will it
> give me in terms of future prospects and career development?


Hi,

To your first question, as R is open source and released under the GPL, there 
are legal issues that you will need to consider, which will be specific to the 
details of your plans, how your "application" is built, how it interacts with 
R, and importantly, the copying and distribution of the end product.

You should, first and foremost, contact a lawyer familiar with open source 
software, specifically GPL compatible licenses, so that you can get proper 
legal advice, which you will not get here. You risk legal/financial liabilities 
down the road if not done in compliance with the license requirements.

As a first pass, you should read:

  
https://cran.r-project.org/doc/FAQ/R-FAQ.html#Can-I-use-R-for-commercial-purposes_003f

and

  https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html

so that you can gain initial insights into some of the general implications of 
building a product for distribution (whether you give it away or sell it) that 
depends upon a GPL licensed application. 

Whether or not there is utility for the application you envision such that 
people would be willing to pay for it, will depend upon a variety of factors, 
not the least of which is what competition you face and the value of your 
planned application over others that are already in the marketplace.

To your second question, you are asking a biased, self selected audience. Thus, 
take that into account for any responses that you may get.

The responses relative to advantages are going to be, to some extent, broadly 
industry specific. That being said, in many domains, knowing R, along with 
other relevant applications and programming languages can only be beneficial in 
many cases.

R is becoming increasingly popular (e.g. see: 
https://www.tiobe.com/tiobe-index/). However, depending upon the subject matter 
domain you will work in and to a large extent, the company or institution you 
will work for, those factors can have a material influence on the role that R 
might play in that environment.

Others can perhaps chime in with other thoughts and perhaps even industry 
specific insights for you.

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.


Re: [R] termplot intervals - SE or CI?

2018-01-11 Thread Eric Goodwin
Peter,

Thanks very much.  Good spotting, and that confirms what I'd deduced from the 
code.

I think you're right that it would be useful to either make that explicit in 
the definition of the se argument (and in the description, which also describes 
them as standard errors), or expose the ff argument of the se.lines() function, 
so that it can be set during the call to termplot(), by the user.  The 
selection of 2.0 as a scaling factor is presumably an approximation of 1.96, to 
give roughly 95% confidence intervals, but it's possible users might want to 
specify some other scaling factor.

Cheers,

Eric Goodwin

-Original Message-
From: peter dalgaard [mailto:pda...@gmail.com] 
Sent: Thursday, 11 January 2018 21:29
To: Eric Goodwin 
Cc: Duncan Murdoch ; r-help@R-project.org
Subject: Re: [R] termplot intervals - SE or CI?

From ?termplot:

col.se, lty.se, lwd.se: color, line type and line width for the
  ‘twice-standard-error curve’ when ‘se = TRUE’.

...which is findable, but might usefully also be made explicit in the 
definition of the se= argument.

-pd

> On 10 Jan 2018, at 23:27 , Eric Goodwin  wrote:
> 
> Thanks for your prompt reply Duncan.  
> 
> I had indeed assumed they were what the help file says until observation 
> raised doubts, which is why I queried it.
> 
> From reading the code for termplot(), it seems that either the predict() 
> function doesn't return the 1x standard error, or the curves plotted by the 
> termplot() function are not 1x standard errors.  If they're not 1x standard 
> errors, it seems misleading to call them (e.g. in the help file) "standard 
> errors".
> 
> The "se.fit" returned by a call in termplot() to predict() is multiplied by 2 
> (in termplot's function se.lines()) before it is plotted as a curve described 
> as "standard errors" by the help file.
> 
> Thus, again, it seems that either termplot() is not plotting standard errors, 
> or predict() is not returning standard errors in se.fit.
> 
> Cheers,
> 
> Eric
> 
> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
> Sent: Wednesday, 29 June 2016 12:02
> To: Eric Goodwin ; r-help@R-project.org
> Subject: Re: [R] termplot intervals - SE or CI?
> 
> On 28/06/2016 4:53 PM, Eric Goodwin wrote:
>> Hello,
>> 
>> A reviewer queried what the intervals were on the termplot I provided in a 
>> report.  The help file for termplot() suggests they're standard errors 
>> (se=T), but in the code the se.fit values from predict() are multiplied by 
>> 2, suggesting it's a rough 95% confidence interval, is that right?
> 
> I would assume they are what the help file says, but if I wasn't sure, I'd 
> work them out for a simple case from first principles, and compare to what 
> the code gives.
> 
> Duncan Murdoch
> 
> 
>> Many thanks,
>> 
>> Eric Goodwin
>> Scientific data analyst | Coastal and Freshwater Group Cawthron 
>> Institute Phone +64 (0)3 548 2319 | Mobile 027 439 1141 
>> eric.good...@cawthron.org.nz | 
>> www.cawthron.org.nz
>> 
>> 
>> #
>> #
>> ###
>> 
>> Note:
>> This message is for the named person's use only.  
>> It=2...{{dropped:30}}
> 
> __
> 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.

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 
Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com










#

Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  If you receive this message in 
error, please immediately delete it and all copies of it from your system, 
destroy any hard copies of it and notify the 
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended recipient. 
Cawthron reserves the right to monitor all e-mail communications through its 
networks. Any opinions expressed in this 
message are those of the individual sender, except where the message states 
otherwise and the sender is authorised to make that statement.

This e-mail message has been scanned and cleared by MailMarshal 
#
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] application of R

2018-01-11 Thread muhammad ramzi
hello guys,

i am a petroleum engineering student and i will be having a long semester
break and currently i am learning THE R PROGRAMMING LANGUAGE just out of
interest. I would just like to know if i am able to design a business
analysis software using R as in create a type of software that can be sold
to business people. can this be done in R language?

another thing is if i do learn this all the way, what advantages will it
give me in terms of future prospects and career development?

[[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] GAM Poisson

2018-01-11 Thread Simon Wood
Not exactly, as by default you are using a log link in the Poisson 
model, but not the Gaussian model. Simon



On 14/12/17 22:57, Miluji Sb wrote:

Dear all,

I apologize as this may not be a strictly R question. I am running GAM
models using the mgcv package.

I was wondering if the interpretation of the smooth splines of the 'x'
variable is the same in the following two cases:

# Linear probability model
m1 <- gam(count ~ factor(city) + factor(year) + s(x),
data=data,na.action=na.omit)

# Poisson
m2 <- gam(count ~ factor(city) + factor(year) + s(x),data=data,
family=poisson,na.action=na.omit)

Thank you!

Sincerely,

Milu

[[alternative HTML version deleted]]

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



--
Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK
+44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190

__
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] [R-pkgs] Release of wbstats 0.2 on CRAN

2018-01-11 Thread Piburn, Jesse O.
Hi all

I'm happy to announce a new version of wbstats is now available on CRAN.

wbstats is an R package for searching and downloading data from the World Bank 
API that includes access to all annual, monthly, and quarterly indicators

in addition to bug fixes. Version 0.2 now

  *   Uses version 2 of the World Bank API. This includes data that is 
unavailable in the previous world bank API
  *   Has the ability to return data in a "wide" format (indicators are 
columns) with the return_wide = TRUE option
  *   More explicit error messaging
  *   Has a lastUpdated field for each data source


CRAN: https://CRAN.R-project.org/package=wbstats
Github: https://github.com/GIST-ORNL/wbstats

A getting started with wbstats article, including examples with sf, ggplot2, 
and leaflet
https://jesse.netlify.com/2018/01/05/getting-started-with-wbstats-a-world-bank-r-package/


Thanks!
Jesse


Jesse Piburn
Research Scientist in Geographic Data Sciences
Geographic Information Science & Technology Group
Computational Sciences and Engineering Division
Oak Ridge National Laboratory
1 Bethel Valley Road P.O. Box 2008 MS-6134
Oak Ridge, TN 37831 6134
Office Phone: 865 576 9318
Mobile Phone (preferred): 865 621 9034
Email: pibur...@ornl.gov


[[alternative HTML version deleted]]

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

__
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] [FORGED] Error occurring in "emmeans" package for the two data sets I used. Please help.

2018-01-11 Thread Lenth, Russell V
This seems to be an entirely new question.

The ‘plot.emmGrid()’ function returns a graphic object of class “ggplot” (by 
default) or “lattice” (if called with ‘engine = “lattice”’). You should use the 
provisions in those respective packages (ggplot2 or lattice) to control the 
details of the plot. In the case of lattice, additional arguments are passed 
via ‘...’ in the call. In the case of ggplot, one may “add” other ggplot:: 
functions to modify the plot.

Russ

Russell V. Lenth  -  Professor Emeritus
Department of Statistics and Actuarial Science   
The University of Iowa  -  Iowa City, IA 52242  USA   
Voice (319)335-0712 (Dept. office)  -  FAX (319)335-3017




From: Akhilesh Singh [mailto:akhileshsingh.i...@gmail.com] 
Sent: Wednesday, January 10, 2018 12:45 AM
To: Sal Mangiafico 
Cc: Rolf Turner ; r-help mailing list 
; Lenth, Russell V 
Subject: Re: [R] [FORGED] Error occurring in "emmeans" package for the two data 
sets I used. Please help.

Thanks for your kind reply. Problem is solved. However, it's "confidence 
interval / treatment comparison plot" is not taking main title. And the fonts 
of axes labels can not be changed using 'cex' parameter. I will appreciate if 
you could help in this matter too.

Dr. A. K. Singh

On 09-Jan-2018 8:18 PM, "Sal Mangiafico" 
 wrote:
One way to avoid this error is to create the aov without using the with 
function, but instead use the data= option in the aov function.
That is,
medley2 = aov(diversity ~ zinc, data=medley.clementis)
emmeans::emmeans(medley2, "zinc")
You can see the difference in the calls:
medley2$call
medley.clementis.aov$call
This works for the other data set as well, e.g.
keough2 = aov(serpulid.ln ~ biofilm, data=keough.raimondi.ln)
~ Sal Mangiafico

On 1/8/2018 4:44 PM, Rolf Turner wrote:

On 07/01/18 02:19, Akhilesh Singh wrote: 


I am a Professor of Statistics at Indira Gandhi Krishi Vishwavidyalaya, 
Raipur, India. While teaching in class about analysis of variance using R, 
I was doing a one-way analysis for the two data-sets given below in the 
R-class. I got a typical error in "emmeans" package, please help: 

Data-set-1: 
-- 
Medley and Clements (1998) investigated the impact of zinc contamination 
(and other heavy metals) on the diversity of diatom species in the USA 
Rocky Mountains. The diversity of diatoms (number of species) and degree of 
zinc contamination (categorized as either of high, medium, low or natural 
background level) were recorded from between four and six sampling stations 
within each of six streams known to be polluted, as given below: 

stream=c("Eagle", "Eagle", "Eagle", "Eagle", "Blue", "Blue", 
  "Blue", "Blue", "Blue", "Blue", "Blue", "Snake", "Snake", 
  "Snake", "Snake", "Snake", "Arkan", "Arkan", "Arkan", 
  "Arkan", "Arkan", "Arkan", "Arkan", "Chalk", "Chalk", 
  "Chalk", "Chalk", "Chalk", "Splat", "Splat", "Splat", 
  "Splat", "Splat", "Splat") 

zinc=c("BACK", "HIGH", "HIGH", "MED", "BACK", "HIGH", "BACK", "BACK", 
    "HIGH", "MED", "MED", "BACK", "MED", "HIGH", "HIGH", "HIGH", 
    "LOW", "LOW", "LOW", "LOW", "MED", "MED", "LOW", "LOW", 
    "HIGH", "HIGH", "MED", "LOW", "BACK", "BACK", "MED", "LOW", 
    "MED", "BACK") 

diversity=c(2.27, 1.25, 1.15, 1.62, 1.7, 0.63, 2.05, 1.98, 1.04, 
 2.19, 2.1, 2.2, 2.06, 1.9, 1.88, 0.85, 1.4, 2.18, 1.83, 
 1.88, 2.02, 1.94, 2.1, 2.38, 1.43, 1.37, 1.75, 2.83, 
 1.53, 0.76, 0.8, 1.66, 0.98, 1.89) 

medley.clementis=data.frame(stream,zinc,diversity) 

I did the one-way anova: 
--- 

medley.clementis.aov=with(medley.clementis, aov(diversity ~ zinc)) 

anova(medley.clementis) 

Then, I tried to do post hoc analysis using "emmeans" package following 
command: 
---
 

emmeans::emmeans(medley.clementis.aov, "zinc") 


This gives following error: 
-- 
Error in recover_data.call(fcall, delete.response(terms(object)), 
object$na.action,  : 
   object 'possibly.random' not found 
Error in ref_grid(object, ...) : 
   Perhaps a 'data' or 'params' argument is needed 



Data-set-2: 
--- 
Keough and Raimondi (1995) examined the effects of four biofilm types (SL: 
sterile unfilmed substrate, NL: netted laboratory biofilms, UL: unnetted 
laboratory biofilms and F: netted field biofilms) on the recruitment of 
serpulid larvae. Substrates treated with one of the four biofilm types were 
left in shallow marine waters for one week after which the number of newly 
recruited serpulid worms were counted, as given below: 

biofilm=c("SL", "SL", "SL", "SL", "SL", "SL", "SL", "UL", "UL", "UL", 
   "UL", "UL", "UL", "UL", "NL", "NL", "NL", "NL", "NL", "NL", 
   

Re: [R] termplot intervals - SE or CI?

2018-01-11 Thread peter dalgaard
From ?termplot:

col.se, lty.se, lwd.se: color, line type and line width for the
  ‘twice-standard-error curve’ when ‘se = TRUE’.

...which is findable, but might usefully also be made explicit in the 
definition of the se= argument.

-pd

> On 10 Jan 2018, at 23:27 , Eric Goodwin  wrote:
> 
> Thanks for your prompt reply Duncan.  
> 
> I had indeed assumed they were what the help file says until observation 
> raised doubts, which is why I queried it.
> 
> From reading the code for termplot(), it seems that either the predict() 
> function doesn't return the 1x standard error, or the curves plotted by the 
> termplot() function are not 1x standard errors.  If they're not 1x standard 
> errors, it seems misleading to call them (e.g. in the help file) "standard 
> errors".
> 
> The "se.fit" returned by a call in termplot() to predict() is multiplied by 2 
> (in termplot's function se.lines()) before it is plotted as a curve described 
> as "standard errors" by the help file.
> 
> Thus, again, it seems that either termplot() is not plotting standard errors, 
> or predict() is not returning standard errors in se.fit.
> 
> Cheers,
> 
> Eric
> 
> -Original Message-
> From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] 
> Sent: Wednesday, 29 June 2016 12:02
> To: Eric Goodwin ; r-help@R-project.org
> Subject: Re: [R] termplot intervals - SE or CI?
> 
> On 28/06/2016 4:53 PM, Eric Goodwin wrote:
>> Hello,
>> 
>> A reviewer queried what the intervals were on the termplot I provided in a 
>> report.  The help file for termplot() suggests they're standard errors 
>> (se=T), but in the code the se.fit values from predict() are multiplied by 
>> 2, suggesting it's a rough 95% confidence interval, is that right?
> 
> I would assume they are what the help file says, but if I wasn't sure, I'd 
> work them out for a simple case from first principles, and compare to what 
> the code gives.
> 
> Duncan Murdoch
> 
> 
>> Many thanks,
>> 
>> Eric Goodwin
>> Scientific data analyst | Coastal and Freshwater Group Cawthron 
>> Institute Phone +64 (0)3 548 2319 | Mobile 027 439 1141 
>> eric.good...@cawthron.org.nz | 
>> www.cawthron.org.nz
>> 
>> 
>> ##
>> ###
>> 
>> Note:
>> This message is for the named person's use only.  It=2...{{dropped:30}}
> 
> __
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@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.