Skip to content

Commit

Permalink
Add vignette of "Known Cases". Data lives in inst/known_cases.json
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Mar 6, 2024
1 parent 72e976c commit 6510524
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Package: marshal
Version: 0.0.1-9003
Version: 0.0.1-9004
Title: Framework to Marshal Objects to be Used in Another R Process
Depends:
R (>= 3.2.0)
Suggests:
knitr,
DT,
jsonlite,
bundle,
caret,
data.table,
Expand Down Expand Up @@ -32,6 +35,8 @@ Suggests:
xgboost,
XML,
xml2
VignetteBuilder:
knitr
Authors@R:
person(given = "Henrik", family = "Bengtsson",
role = c("aut", "cre", "cph"),
Expand All @@ -44,4 +49,4 @@ ByteCompile: TRUE
URL: https://marshal.futureverse.org, https://github.com/HenrikBengtsson/marshal
BugReports: https://github.com/HenrikBengtsson/marshal/issues
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
175 changes: 175 additions & 0 deletions inst/known_cases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
[
{
"package": "base",
"type": "connection",
"if_not_marshalled": "error, incorrect result, file corruption",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "parallel",
"type": "SOCKnode, SOCK0node",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "arrow",
"type": "Array, Table",
"if_not_marshalled": "error",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "caret",
"type": "train",
"if_not_marshalled": "",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "cpp11",
"type": "function",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "data.table",
"type": "data.table",
"if_not_marshalled": "",
"can_be_marshalled": true,
"must_be_marshalled": false
},
{
"package": "DBI",
"type": "DBIConnection",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "inline",
"type": "CFunc, et al.",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "keras",
"type": "keras.engine.training.Model",
"if_not_marshalled": "error",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "magick",
"type": "magick-image",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "ncdf4",
"type": "ncdf4",
"if_not_marshalled": "",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "parsnip",
"if_not_marshalled": "",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "raster",
"type": "RasterLayer",
"if_not_marshalled": "???",
"can_be_marshalled": false
},
{
"package": "Rcpp",
"type": "function",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "reticulate",
"type": "python.builtin.object",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "rJava",
"type": "jclassName, jobjRef",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "rstan",
"type": "stanfit",
"if_not_marshalled": "",
"can_be_marshalled": true,
"must_be_marshalled": false
},
{
"package": "sparklyr",
"type": "tbl_spark",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "terra",
"type": "SpatVectortype, SpatRaster",
"if_not_marshalled": "error",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "udpipe",
"type": "udpipe_model",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "xgboost",
"type": "xgb.DMatrix",
"if_not_marshalled": "incorrect result",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "XML",
"type": "XMLInternalDocument, XMLInternalNode",
"if_not_marshalled": "segmentation fault",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "xml2",
"type": "xml_document, xml_nodesettype, xml_node",
"if_not_marshalled": "error",
"can_be_marshalled": true,
"must_be_marshalled": true
},
{
"package": "ShortRead",
"type": "FastqStreamer",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
},
{
"package": "polars",
"type": "RPolarsDataFrame, et al.",
"if_not_marshalled": "error",
"can_be_marshalled": false,
"must_be_marshalled": true
}
]
13 changes: 13 additions & 0 deletions man/marshal-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions vignettes/known_cases.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "Known Cases where Marshalling is Needed and not"
output: rmarkdown::html_vignette
vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteIndexEntry{Known Cases where Marshalling is Needed and not}
%\VignetteEncoding{UTF-8}
---


```{r, echo = FALSE}
known_cases <- system.file("known_cases.json", package = "marshal")
support <- jsonlite::read_json(known_cases, simplifyVector = TRUE)
support <- lapply(support, FUN = function(x) {
if (is.logical(x)) c("no", "yes")[x+1] else x
})
support <- as.data.frame(support)
names <- colnames(support)
names <- gsub("_marshalled", "_marshalled?", names)
names <- gsub("_", " ", names)
names <- gsub("_", " ", names)
colnames(support) <- names
DT::datatable(support, options = list(pageLength = 50))
```

0 comments on commit 6510524

Please sign in to comment.