RCall.jl
RCall.jl copied to clipboard
segfault with ggplot
works without + geom_smooth() R version 3.3.2 ggplot2 2.2.1
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-linux-gnu
julia> using RCall
julia> R"library(ggplot2)"
RCall.RObject{RCall.StrSxp}
[1] "ggplot2" "stats" "graphics" "grDevices" "utils" "datasets"
[7] "methods" "base"
julia> R"qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y)"
RCall.RObject{RCall.VecSxp}
julia> R"qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y) + geom_smooth()"
RCall.RObject{RCall.VecSxp}
signal (11): Segmentation fault
signal (ding no file, in expression starting on line 0
signal (11): Segmentation fault
while loading no file, in expresswhile loading no file, in expression starting on line 0
while loading no file, in expresswhile loading no file, in expresswhile loading no file, in expression starting on line 0
while loading no file, in expression starting on line 0
while loading no file, in expressSegmentation fault (core dumped)
Works fine on mine, but I did notice it throws a warning: maybe this is the problem. Does
R"qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y) + geom_smooth(method='loess')"
work? Also, does
R"warning('test')"
work?
warning works, your other suggestion does not
julia> R"warning('test')"
WARNING: RCall.jl: Warning: test
RCall.RObject{RCall.StrSxp}
[1] "test"
julia> R"qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y) + geom_smooth(method='loess')"
RCall.RObject{RCall.VecSxp}
signal (11): Segmentation fault
signal (11): Segmentation fault
signal (11): Segmentation fault
signal (11): Segmentation fault
on starting on line 0
signal (11): Segmentation fault
while loading no file, in expression starting on line 0
Segmentation fault (core dumped)
Hmm, that ruins that theory then. What OS & version (i.e. output of lsb_release -a
)?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
@jotwin Were you using X11 as the graphical device? Would you try using pdf device?
R"""
pdf("a.pdf")
print(qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y) + geom_smooth(method='loess'))
dev.off()
"""
julia> R"""
pdf("a.pdf")
print(qplot(data=data.frame(x=rnorm(100), y=rnorm(100)), x=x, y= y) + geom_smooth(method='loess'))
dev.off()
"""
signal (11): Segmentation fault
while loading Segmentation fault
signal (11): Segmentation fault
while loading no file, in expresswhile loading no file, in expression starting on line 79
signal (11): Segmentation fault
on starting on line 79
signal (11): Segmentation fault
while loading no file, in expression starting on line 79
Segmentation fault (core dumped)
Does it work without geom_smotth
? (i.e., it creates the file a.pdf
).
How about running the same commands in R? Does it raise a segfault?
No problems in R, or in RCall without geom_smooth