Skip to content

Commit

Permalink
Add auto linting
Browse files Browse the repository at this point in the history
Former-commit-id: b0c2804
  • Loading branch information
Robinlovelace committed Apr 19, 2022
1 parent 1c2bfaa commit 82c118b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
linters: with_defaults(
line_length_linter(120),
assignment_linter = NULL
)
4 changes: 2 additions & 2 deletions vignettes/si.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Prepare the OD dataset as follows:

```{r}
od_sim = si_to_od(origins = zones, destinations = zones)
head(od_sim, 2)
names(od_sim)
```

Note that the output has duplicate columns: `si_to_od()` joins data from the origin and destination objects into the resulting OD object.
Expand All @@ -119,7 +119,7 @@ A simplistic SIM can be created just based on the distance between points:
```{r unconstrained1}
si_power = function(od, beta) {
(od[["distance_euclidean"]] / 1000)^beta
}
}
od_calculate = si_calculate(od_sim, fun = si_power, beta = -0.8)
plot(od_calculate["res"], logz = TRUE)
```
Expand Down

0 comments on commit 82c118b

Please sign in to comment.