Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Petrik committed Jan 3, 2024
1 parent b33dd5b commit 7d7d602
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions docs/src/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ using CSV
filein = joinpath(dirname(pathof(MDPs)), "..", "data", "riverswim.csv")
fileout = tempname()
model = load_mdp(CSV.File(filein); idoutcome = 1)
output = save_mdp(DataFrame, model)
1
# output
1
```

Converting from an Arrow to a CSV file
Expand All @@ -26,9 +29,12 @@ using CSV
filein = joinpath(dirname(pathof(MDPs)), "..", "data", "inventory.arr")
fileout = tempname()
model = load_mdp(Arrow.Table(filein))
output = save_mdp(DataFrame, model)
CSV.write(fileout, output)
1
# output
1
```
6 changes: 3 additions & 3 deletions src/models/integral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ Load the model from an Arrow file (a binary tabular file format)
```jldoctest
using MDPs, Arrow
filepath = joinpath(dirname(pathof(MDPs)), "..",
"data", "riverswim.arrow")
model = load_mdp(Arrow.Table(filepath); idoutcome = 1)
"data", "inventory.arr")
model = load_mdp(Arrow.Table(filepath))
state_count(model)
# output
20
21
```
"""
function load_mdp(input; idoutcome = nothing, docompress = false)
Expand Down

0 comments on commit 7d7d602

Please sign in to comment.