Skip to content

Commit

Permalink
address PR comments and reorganize
Browse files Browse the repository at this point in the history
Signed-off-by: milevavantuyl <[email protected]>
  • Loading branch information
milevavantuyl committed Jun 8, 2022
1 parent f05295a commit e14dc28
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
24 changes: 15 additions & 9 deletions aif360/aif360-r/README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,18 @@ aif360::install_aif360(envname = "r-test")
```
Note that this step should take a few minutes and the R session will restart.

4) Finally, load the aif360 functions

```
library(aif360)
4) You can now activate your Python environment
```r
reticulate::use_miniconda(condaenv = "r-test", required = TRUE)
load_aif360_lib()
```


## Getting Started

``` r
```r
library(aif360)
load_aif360_lib()
```

If you get an error: `cannot change value of locked binding`, please restart the R session and run `load_aif360_lib()` exactly once.

``` r
# load a toy dataset
data <- data.frame("feature1" = c(0,0,1,1,1,1,0,1,1,0),
Expand All @@ -135,6 +130,17 @@ formatted_dataset <- aif360::aif_dataset(data_path = data,

```

## Troubleshooting

If you encounter any errors during the installation process, look for your issue here and try the solutions.

### Locked binding
If you get an error: `cannot change value of locked binding`, please restart the R session. Then try reactivating your Python environment and running the following commands exactly once:
```r
library(aif360)
load_aif360_lib()
```

## Contributing

If you'd like to contribute to the development of aif360, please read [these guidelines](CONTRIBUTING.md).
Expand Down
30 changes: 21 additions & 9 deletions aif360/aif360-r/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,19 @@ aif360::install_aif360(envname = "r-test")
Note that this step should take a few minutes and the R session will
restart.

4) Finally, load the aif360 functions
4) You can now activate your Python environment

<!-- -->

library(aif360)
reticulate::use_miniconda(condaenv = "r-test", required = TRUE)
load_aif360_lib()
``` r
reticulate::use_miniconda(condaenv = "r-test", required = TRUE)
```

## Getting Started

``` r
library(aif360)
load_aif360_lib()
```

If you get an error: `cannot change value of locked binding`, please
restart the R session and run `load_aif360_lib()` exactly once.

``` r
# load a toy dataset
data <- data.frame("feature1" = c(0,0,1,1,1,1,0,1,1,0),
Expand All @@ -133,6 +129,22 @@ formatted_dataset <- aif360::aif_dataset(data_path = data,
protected_attribute = "feature1")
```

## Troubleshooting

If you encounter any errors during the installation process, look for
your issue here and try the solutions.

### Locked binding

If you get an error: `cannot change value of locked binding`, please
restart the R session. Then try reactivating your Python environment and
running the following commands exactly once:

``` r
library(aif360)
load_aif360_lib()
```

## Contributing

If you’d like to contribute to the development of aif360, please read
Expand Down

0 comments on commit e14dc28

Please sign in to comment.