Skip to content

Commit

Permalink
Merge pull request #11 from erblast/dev
Browse files Browse the repository at this point in the history
style, fix urls
  • Loading branch information
erblast authored Oct 14, 2021
2 parents 8787f68 + 38ca7a6 commit be80192
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
16 changes: 8 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/erblast/parcats?branch=master&svg=true)](https://ci.appveyor.com/project/erblast/parcats)
[![Codecov test coverage](https://codecov.io/gh/erblast/parcats/branch/master/graph/badge.svg)](https://codecov.io/gh/erblast/parcats?branch=master)
[![Codecov test coverage](https://codecov.io/gh/erblast/parcats/branch/master/graph/badge.svg)](https://app.codecov.io/gh/erblast/parcats?branch=master)
[![CRAN status](https://www.r-pkg.org/badges/version/parcats)](https://CRAN.R-project.org/package=parcats)
[![CRAN_time_from_release](https://www.r-pkg.org/badges/ago/parcats)](https://cran.r-project.org/package=parcats)
[![metacran downloads](https://cranlogs.r-pkg.org/badges/grand-total/parcats)](https://cran.r-project.org/package=parcats)
Expand Down Expand Up @@ -87,7 +87,7 @@ The Htmlwidgets cannot be embedded in the `README.md` file. Check out the [Live
### Parcats from alluvial from data in wide format

```{r eval = FALSE}
p = alluvial_wide(mtcars2, max_variables = 5)
p <- alluvial_wide(mtcars2, max_variables = 5)
parcats(p, marginal_histograms = TRUE, data_input = mtcars2)
Expand All @@ -105,12 +105,12 @@ Here we see the response of a random forest model if we vary the three variables


```{r eval = FALSE}
df = select(mtcars2, -ids )
m = randomForest::randomForest( disp ~ ., df)
imp = m$importance
dspace = get_data_space(df, imp, degree = 3)
pred = predict(m, newdata = dspace)
p = alluvial_model_response(pred, dspace, imp, degree = 3)
df <- select(mtcars2, -ids )
m <- randomForest::randomForest( disp ~ ., df)
imp <- m$importance
dspace <- get_data_space(df, imp, degree = 3)
pred <- predict(m, newdata = dspace)
p <- alluvial_model_response(pred, dspace, imp, degree = 3)
parcats(p, marginal_histograms = TRUE, imp = TRUE, data_input = df)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[![AppVeyor build
status](https://ci.appveyor.com/api/projects/status/github/erblast/parcats?branch=master&svg=true)](https://ci.appveyor.com/project/erblast/parcats)
[![Codecov test
coverage](https://codecov.io/gh/erblast/parcats/branch/master/graph/badge.svg)](https://codecov.io/gh/erblast/parcats?branch=master)
coverage](https://codecov.io/gh/erblast/parcats/branch/master/graph/badge.svg)](https://app.codecov.io/gh/erblast/parcats?branch=master)
[![CRAN
status](https://www.r-pkg.org/badges/version/parcats)](https://CRAN.R-project.org/package=parcats)
[![CRAN_time_from_release](https://www.r-pkg.org/badges/ago/parcats)](https://cran.r-project.org/package=parcats)
Expand Down Expand Up @@ -82,7 +82,7 @@ here](https://erblast.github.io/parcats/articles/parcats.html).
### Parcats from alluvial from data in wide format

``` r
p = alluvial_wide(mtcars2, max_variables = 5)
p <- alluvial_wide(mtcars2, max_variables = 5)

parcats(p, marginal_histograms = TRUE, data_input = mtcars2)
```
Expand All @@ -105,12 +105,12 @@ variables with the highest importance while keeping all other features
at their median/mode value.

``` r
df = select(mtcars2, -ids )
m = randomForest::randomForest( disp ~ ., df)
imp = m$importance
dspace = get_data_space(df, imp, degree = 3)
pred = predict(m, newdata = dspace)
p = alluvial_model_response(pred, dspace, imp, degree = 3)
df <- select(mtcars2, -ids )
m <- randomForest::randomForest( disp ~ ., df)
imp <- m$importance
dspace <- get_data_space(df, imp, degree = 3)
pred <- predict(m, newdata = dspace)
p <- alluvial_model_response(pred, dspace, imp, degree = 3)

parcats(p, marginal_histograms = TRUE, imp = TRUE, data_input = df)
```
Expand Down
21 changes: 10 additions & 11 deletions vignettes/parcats.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ editor_options:
## Examples

```{r}
suppressPackageStartupMessages( require(tidyverse) )
suppressPackageStartupMessages( require(easyalluvial) )
suppressPackageStartupMessages( require(parcats) )
suppressPackageStartupMessages(require(tidyverse))
suppressPackageStartupMessages(require(easyalluvial))
suppressPackageStartupMessages(require(parcats))
```


### Parcats from alluvial from data in wide format

```{r eval = TRUE, fig.width = 10, fig.height = 7}
p = alluvial_wide(mtcars2, max_variables = 5)
p <- alluvial_wide(mtcars2, max_variables = 5)
parcats(p, marginal_histograms = TRUE, data_input = mtcars2)
Expand All @@ -46,12 +45,12 @@ Here we see the response of a random forest model if we vary the three variables


```{r eval = TRUE, fig.width = 10, fig.height = 7}
df = select(mtcars2, -ids )
m = randomForest::randomForest( disp ~ ., df)
imp = m$importance
dspace = get_data_space(df, imp, degree = 3)
pred = predict(m, newdata = dspace)
p = alluvial_model_response(pred, dspace, imp, degree = 3)
df <- select(mtcars2, -ids )
m <- randomForest::randomForest( disp ~ ., df)
imp <- m$importance
dspace <- get_data_space(df, imp, degree = 3)
pred <- predict(m, newdata = dspace)
p <- alluvial_model_response(pred, dspace, imp, degree = 3)
parcats(p, marginal_histograms = TRUE, imp = TRUE, data_input = df)
Expand Down

0 comments on commit be80192

Please sign in to comment.