Re: [R] SpreadLevelPlot for more than one factor

2018-01-06 Thread Ashim Kapoor
Dear All,

we need to do :

library(car) for the spreadLevelPlot function

I forgot to say that.

Apologies,
Ashim

On Sun, Jan 7, 2018 at 10:37 AM, Ashim Kapoor  wrote:

> Dear All,
>
> I want a transformation which will make the spread of the response at  all
> combinations
> of  2 factors the same.
>
> See for example :
>
> boxplot(breaks ~ tension * wool, warpbreaks)
>
> The closest I  can do is :
>
> spreadLevelPlot(breaks ~tension , warpbreaks)
> spreadLevelPlot(breaks ~ wool , warpbreaks)
>
> I want to do :
>
> spreadLevelPlot(breaks ~tension * wool, warpbreaks)
>
> But I get :
>
> > spreadLevelPlot(breaks ~tension * wool , warpbreaks)
> Error in spreadLevelPlot.formula(breaks ~ tension * wool, warpbreaks) :
>   right-hand side of model has more than one variable
>
> What is the corresponding appropriate function for 2 factors ?
>
> Many thanks,
> Ashim
>

[[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] SpreadLevelPlot for more than one factor

2018-01-06 Thread Ashim Kapoor
Dear All,

I want a transformation which will make the spread of the response at  all
combinations
of  2 factors the same.

See for example :

boxplot(breaks ~ tension * wool, warpbreaks)

The closest I  can do is :

spreadLevelPlot(breaks ~tension , warpbreaks)
spreadLevelPlot(breaks ~ wool , warpbreaks)

I want to do :

spreadLevelPlot(breaks ~tension * wool, warpbreaks)

But I get :

> spreadLevelPlot(breaks ~tension * wool , warpbreaks)
Error in spreadLevelPlot.formula(breaks ~ tension * wool, warpbreaks) :
  right-hand side of model has more than one variable

What is the corresponding appropriate function for 2 factors ?

Many thanks,
Ashim

[[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] partialPlot en un Randomforest

2018-01-06 Thread Carlos Ortega
Hola,

Ya es que la explicación de la función es un tanto oscura...

Mira el ejemplo (clasificación):

> data(iris)
> set.seed(543)
> iris.rf <- randomForest(Species~., iris)
> partialPlot(iris.rf, iris, Petal.Width, "versicolor")

Y el gráfico que se produce:

[image: Imágenes integradas 1]
El gráfico mide la variación de la probabilidad sobre una de las clases de
la variable target (en este caso la variable target es "Species" y la clase
es "versicolor") de acuerdo a cómo varía la variable de estudio, en este
caso "Petal.Width". El gráfico te indica que valores de Petal.Width
cercanos a 1.0 se obtiene el máximo de probabilidad de que Species sea
"versicolor".

Y algo parecido para cuando tienes un modelo de "regresión".

No sé ese "VR" que comentas en tu duda de dónde sale...

Si estás interesado en este tema, mira también el paquete  "pdp".

Gracias,
Carlos Ortega
www.qualityexcellence.es


El 7 de enero de 2018, 1:21, Manuel Mendoza 
escribió:

>
> Hola erreros. A ver si alguien podría decirme qué son los dos ejes del
> plot que resulta de aplicar partialPlot en un Randomforest.
>
> Encuentro que:
>
> Partial dependence plot gives a graphical depiction of the marginal effect
> of a variable on the class probability (classification) or response
> (regression)
>
> que nos indica como varía la VR en función de la variable considerada,
> manteniendo el resto de variables fijas.
>
> No encuentro lo que es esa VR por ningún sitio (varianza?), ni la
> explicación de qué son los dos ejes.
>
> Gracias,
> Manuel
>
>
> --
> Dr Manuel Mendoza
> Department of Biogeography and Global Change
> National Museum of Natural History (MNCN)
> Spanish Scientific Council (CSIC)
> C/ Serrano 115bis, 28006 MADRID
> Spain
>
> ___
> 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
___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] How to programmatically save a web-page using R (mimicking Command+S)

2018-01-06 Thread Henrik Bengtsson
The 'webshot' package (on CRAN) can do this.

Henrik

On Jan 6, 2018 05:27, "Christofer Bogaso" 
wrote:

> Hi,
>
> I would appreciate if someone can give me a pointer on how to save a
> webpage programmatically using R.
>
> For example, let say I have this webpage open in my browser:
>
> http://www.bseindia.com/stock-share-price/dabur-india-ltd/dabur/500096/
>
> When manually I save this page, I just press Command+S (using Mac) and
> then this page get saved in hard-disk
>
> Now I want R to mimic this same job that I do using Command-S
>
> So far I have tried with readLines() however the output content is
> different than what I could achieve using Command+S
>
> Any help will be highly appreciated.
>
> Thanks for your time.
>
> __
> 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] How to programmatically save a web-page using R (mimicking Command+S)

2018-01-06 Thread Christofer Bogaso
Hi,

I would appreciate if someone can give me a pointer on how to save a
webpage programmatically using R.

For example, let say I have this webpage open in my browser:

http://www.bseindia.com/stock-share-price/dabur-india-ltd/dabur/500096/

When manually I save this page, I just press Command+S (using Mac) and
then this page get saved in hard-disk

Now I want R to mimic this same job that I do using Command-S

So far I have tried with readLines() however the output content is
different than what I could achieve using Command+S

Any help will be highly appreciated.

Thanks for your time.

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