Skip to content

Commit 6ccf044

Browse files
authored
update DataFrame notation (#27)
the example does not run as it is because of an outdated notation of DataFrames to select columns
1 parent d73a705 commit 6ccf044

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ using RDatasets
1212
using Gadfly
1313

1414
cars = dataset("datasets","cars")
15-
X = map(Float64,convert(Array,cars[:Speed]))
16-
Y = map(Float64,convert(Array,cars[:Dist]))
15+
X = map(Float64,convert(Array,cars[!,:Speed]))
16+
Y = map(Float64,convert(Array,cars[!,:Dist]))
1717

1818
spl = fit(SmoothingSpline, X, Y, 250.0) # λ=250.0
1919
Ypred = predict(spl) # fitted vector

0 commit comments

Comments
 (0)