I wonder if the functions are broken. This:
using DataFrames, RDatasets
iris = dataset("datasets", "iris")
iris[:id] = 1:size(iris, 1)
longdf = melt(iris, :id)
widedf = unstack(longdf, :id, :variable, :value)
from http://dataframesjl.readthedocs.io/en/latest/reshaping_and_pivoting.html
fails with
ERROR: MethodError: Cannot `convert` an object of type String to an object
of type Float64
This may have arisen from a call to the constructor Float64(...),
since type constructors fall back to convert methods.
in setindex!(::DataArrays.DataArray{Float64,1}, ::String, ::Int64) at /
Users/michael/.julia/v0.5/DataArrays/src/indexing.jl:217
in unstack(::DataFrames.DataFrame, ::Int64, ::Int64, ::Int64) at /Users/
michael/.julia/v0.5/DataFrames/src/abstractdataframe/reshape.jl:183
in unstack(::DataFrames.DataFrame, ::Symbol, ::Symbol, ::Symbol) at /Users/
michael/.julia/v0.5/DataFrames/src/abstractdataframe/reshape.jl:188
I have opened an issue at the repo.
--
You received this message because you are subscribed to the Google Groups
"julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.