The Mellio R bridge moves statistical results from R into Mellio’s Stats workspace as structured Result Cards that can be saved, formatted, and used in a manuscript.
This vignette walks through the common workflow.
By default, mellio_open() opens the hosted Mellio app at
https://www.mellioapp.com.
# Advanced users can point this at a trusted Mellio deployment:
# options(mellio.editor_url = "https://www.mellioapp.com")The R payload is encoded in the URL fragment. URL fragments are not sent as HTTP requests to the server, but the full URL can still be visible to the browser, the opened web app, browser history, extensions, and anyone the URL is shared with.
mellio_open() builds a Result Card from a supported R
object and opens it in your browser.
library(mellio)
# Welch's two-sample t-test
mellio_open(t.test(extra ~ group, data = sleep))
# Pearson correlation
mellio_open(cor.test(mtcars$mpg, mtcars$wt))
# Chi-squared
M <- matrix(c(10, 20, 30, 40), nrow = 2)
mellio_open(chisq.test(M))The card shows the test statistic, df, p-value, and effect when available, formatted in APA 7 style.
lmer and glmer cards show AIC, logLik, and
N inline (lavaan gets full fit indices below).
library(lavaan)
HS.model <- "visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9"
fit <- cfa(HS.model, data = HolzingerSwineford1939)
mellio_open(fit)You’ll see a structural card with two zones:
=~ loadings, ~ regressions,
~~ (co)variances, ~1 intercepts,
:= defined parameters)Pre-mark focal paths so they surface in the report zone:
Each Result Card carries:
print() for
auditLocal provenance fields such as user name, host name, working directory, git state, and script path are opt-in:
Set options(mellio.provenance = FALSE) to omit
provenance metadata.
The Save to Library button on the card persists it. When you’re signed into Mellio, cards sync to your account and follow you across devices. When you’re not signed in, cards live in browser localStorage.
The Library lists everything you’ve saved with search and type filters. Click any card to reopen it.
From the Library view:
Once mellio is loaded, RStudio’s Addins
menu gets a Send to Mellio entry. Highlight an R
expression (t.test(...)) and run the addin — same effect as
typing mellio_open().
mellio_open() opens a browser, which is interactive. For
scripts and knitr documents, use mellio_payload() to get
the JSON payload directly without launching a browser:
Use citation("mellio") for the package citation.