nmeOut <- tempfile(fileext = ".omv")
# the paste's underneath are only for readability (without them, the vignettes are misformatted)
# example for a data set without a license
dtaFrm <- jmvReadWrite::ToothGrowth[, c("len", "supp", "dose")]
lstDsc <- list(description = paste("The response is the length of odontoblasts (cells",
"responsible for tooth growth) in 60 guinea pigs. Each",
"animal received one of three dose levels of vitamin C",
"(0.5, 1, and 2 mg / day) by one of two delivery methods,",
"orange juice or ascorbic acid (a form of vitamin C and",
"coded as VC)."),
variables = list(len = "Tooth length",
supp = "Supplement type (VC or OJ)",
dose = "Dose (in milligrams / day)"),
references = paste("Crampton, E. W. (1947). The growth of the odontoblast of",
"the incisor teeth as a criterion of vitamin C intake of",
"the guinea pig. The Journal of Nutrition, 33(5),",
"491-504. https://doi.org/10.1093/jn/33.5.491"),
license = "")
jmvReadWrite::describe_omv(dtaInp = dtaFrm, fleOut = nmeOut, dtaTtl = "ToothGrowth",
dtaDsc = lstDsc)
# don't include the unlink, if you copy the code and want to look at the resulting output file
unlink(nmeOut)
# example for a data set which is part of the R-package `datasets` under the GPL2
dtaFrm <- datasets::penguins
lstDsc <- list(description = paste("Data on adult penguins covering three species found on",
"three islands in the Palmer Archipelago, Antarctica,",
"including their size (flipper length, body mass, bill",
"dimensions), and sex."),
variables = list(species = "Species (Adelie, Chinstrap, and Gentoo)",
island = "Island (Biscoe, Dream, and Torgersen)",
bill_len = "Bill length (in mm)",
bill_dep = "Bill depth (in mm)",
flipper_len = "Flipper length (in mm)",
body_mass = "Body mass (in g)",
sex = "Sex (female and male)",
year = "Study year: 2007, 2008, or 2009"),
references = paste("Gorman, K. B., Williams, T. D., & Fraser, W. R. (2014).",
"Ecological sexual dimorphism and environmental variability",
"within a community of antarctic penguins (Genus pygoscelis).",
"PLoS ONE, 9(3), e90081.",
"https://doi.org/10.1371/journal.pone.0090081"),
license = c("RP_GPL2", "datasets"))
jmvReadWrite::describe_omv(dtaInp = dtaFrm, fleOut = nmeOut, dtaTtl = "Penguins",
dtaDsc = lstDsc)
# don't include the unlink, if you copy the code and want to look at the resulting output file
unlink(nmeOut)
# the code underneath should cover all formatting options jamovi is able to use (paste0 is only
# for readability)
dtaFrm <- jmvReadWrite::ToothGrowth[, c("len", "supp", "dose")]
chrDsc <- paste0("Trial - all formattings:",
"boldbold, italics",
"italicsunderlinedstrikethrough",
"C2H5OHR2",
"background colour: red",
"foreground color: red",
"centered",
"right",
"justify justify justify justify justify ",
"justify justify justify justify justify justify justify justify justify ",
"justify justify justify justify justify justify justify justify justify ",
"justify justify",
"numbered listnumbered list",
"bullet pointbullet point",
"indented once",
"indented twice",
"indented once",
"Formula: e=mc^2",
"Preformattednormal againHeading")
jmvReadWrite::describe_omv(dtaInp = dtaFrm, fleOut = nmeOut, dtaTtl = "ToothGrowth",
dtaDsc = chrDsc)
# don't include the unlink, if you copy the code and want to look at the resulting output file
unlink(nmeOut)
Run the code above in your browser using DataLab