{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaInterop/RCall.jl/issues/155","repository_url":"https://api.github.com/repos/JuliaInterop/RCall.jl","labels_url":"https://api.github.com/repos/JuliaInterop/RCall.jl/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/JuliaInterop/RCall.jl/issues/155/comments","events_url":"https://api.github.com/repos/JuliaInterop/RCall.jl/issues/155/events","html_url":"https://github.com/JuliaInterop/RCall.jl/issues/155","id":188854555,"number":155,"title":"Examples of complex variable creation in julia, and then passed to R.","user":{"login":"Ward9250","id":3399309,"avatar_url":"https://avatars.githubusercontent.com/u/3399309?v=3","gravatar_id":"","url":"https://api.github.com/users/Ward9250","html_url":"https://github.com/Ward9250","followers_url":"https://api.github.com/users/Ward9250/followers","following_url":"https://api.github.com/users/Ward9250/following{/other_user}","gists_url":"https://api.github.com/users/Ward9250/gists{/gist_id}","starred_url":"https://api.github.com/users/Ward9250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ward9250/subscriptions","organizations_url":"https://api.github.com/users/Ward9250/orgs","repos_url":"https://api.github.com/users/Ward9250/repos","events_url":"https://api.github.com/users/Ward9250/events{/privacy}","received_events_url":"https://api.github.com/users/Ward9250/received_events","type":"User","site_admin":false},"labels":[{"id":162511573,"url":"https://api.github.com/repos/JuliaInterop/RCall.jl/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-11T21:26:47Z","updated_at":"2016-11-11T22:25:46Z","closed_at":"2016-11-11T22:25:46Z","body":"R packages often introduce more complex custom variables/objects with an S3 or S4 class. These are sometimes lists with certain elements and then a class attribute in the case of S3, or a more formal thing (S4), say you had such a custom class in R, and a corresponding type defined in julia, can you provide an example of the methods and types one would need to define to transfer such custom classes between julia and R?\r\n\r\nE.g.\r\nCustom R class:\r\n\r\n```R\r\na <- list(\"AwesomeA\" = c(1,2,3,4,5), \"AwesomeB\" = c(TRUE, FALSE))\r\nclass(a) <- \"MyAwesomeClass\"\r\n```\r\n\r\nAnd the corresponding julia type\r\n```julia\r\ntype MyAwesomeType\r\n    AwesomeA::Vector{Int}\r\n    AwesomeB::Vector{Bool}\r\nend\r\n```"}}
{"actor":{"display_login":"ararslan"}}