Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to produce any plots in R on Mac Studio #54

Open
jamesjiadazhan opened this issue Jan 20, 2024 · 0 comments
Open

Not able to produce any plots in R on Mac Studio #54

jamesjiadazhan opened this issue Jan 20, 2024 · 0 comments

Comments

@jamesjiadazhan
Copy link

I tried to use the function, but it does not work. I think it is because I cannot use font_family_exists() on my icloud, which has two users. Or because I am using Mac Studio. Anyway to solve this? I am very frustrated about this. Thanks a lot.

r$> library(rvg)
    library(ggplot2)
    library(officer)

r$> my_vec_graph <- dml(code = barplot(1:5, col = 2:6))
 
    doc <- read_pptx()
    doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
    doc <- ph_with(doc, my_vec_graph, location = ph_location_fullsize() )
    print(doc, target = "my_plot.pptx")

 *** caught segfault ***
address 0x0, cause 'invalid permissions'

Traceback:
 1: system_fonts_c()
 2: system_fonts()
 3: sys_fonts()
 4: FUN(X[[i]], ...)
 5: lapply(def_fonts, font_family_exists)
 6: unlist(lapply(def_fonts, font_family_exists))
 7: default_fontname()
 8: validate_fonts(fonts)
 9: dml_pptx(offx = 0L, offy = 0L, width = 10, height = 7.5, bg = "white",     fonts = list(), pointsize = 12, editable = TRUE, file = "/var/folders/r7/g81tj9ds70bdmgdbnp49ddn80000gn/T//RtmpuD95Yx/file57a159673765",     id = 0L, last_rel_id = 1, raster_prefix = "/var/folders/r7/g81tj9ds70bdmgdbnp49ddn80000gn/T//RtmpuD95Yx/file57a11170246c/raster-",     standalone = FALSE)
10: do.call("dml_pptx", pars)
11: ph_with.dml(doc, my_vec_graph, location = ph_location_fullsize())
12: ph_with(doc, my_vec_graph, location = ph_location_fullsize())

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant