RCall.jl icon indicating copy to clipboard operation
RCall.jl copied to clipboard

Method error with RCall 0.9 and DataFrames 0.11.3

Open protogeezer opened this issue 7 years ago • 3 comments

Trying to convert a data frame containing a PooledDataArray to R results in a MethodError julia> r = RObject(j1) ERROR: MethodError: no method matching sexp(::Type{RCall.StrSxp}, ::DataArrays.PooledDataArray{String,UInt16,1}) Closest candidates are: sexp(::Type{RCall.StrSxp}, ::Symbol) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/base.jl:217 sexp(::Type{RCall.StrSxp}, ::Ptr{RCall.CharSxp}) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/base.jl:266 sexp(::Type{RCall.StrSxp}, ::AbstractString) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/base.jl:267 ... Stacktrace: [1] sexp(::DataArrays.PooledDataArray{String,UInt16,1}) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/default.jl:192 [2] sexp(::Type{RCall.VecSxp}, ::DataFrames.DataFrame) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/dataframe.jl:19 [3] RCall.RObject(::DataFrames.DataFrame) at /Users/sjbespa/.julia/v0.6/RCall/src/convert/default.jl:166

protogeezer avatar Jan 05 '18 01:01 protogeezer

Try updating DataArrays. The new version of DataArrays has deprecated PooledDataArray.

randy3k avatar Jan 05 '18 03:01 randy3k

I tried updating to the master on RCall and DataArrays, but the same thing is happening

julia> Pkg.status("RCall")

  • RCall 0.9.0+ master

julia> Pkg.status("DataArrays")

  • DataArrays 0.7.0 master

julia> Pkg.status("DataFrames")

  • DataFrames 0.11.3

On Jan 4, 2018, at 7:18 PM, Randy Lai [email protected] wrote:

Try updating DataArrays. The new version of DataArrays has deprecated PooledDataArray.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaInterop/RCall.jl/issues/220#issuecomment-355463018, or mute the thread https://github.com/notifications/unsubscribe-auth/AFK8lglxOwGSbsUuf1-aAQfi6xfsfx3Wks5tHZSFgaJpZM4RT7Cy.

protogeezer avatar Jan 05 '18 05:01 protogeezer

You should use CategoricalArrays.jl instead of PooledDataArrays.

randy3k avatar Jan 05 '18 05:01 randy3k

Closing as very stale at this point

palday avatar Jun 09 '23 14:06 palday