### Example Setup Source: https://sjentsch.github.io/jmvReadWrite/reference/arrange_cols_omv.html Basic setup for defining input and output file paths for the function. ```R nmeInp <- system.file("extdata", "AlbumSales.omv", package = "jmvReadWrite") nmeOut <- tempfile(fileext = ".omv") ``` -------------------------------- ### Example Input Setup Source: https://sjentsch.github.io/jmvReadWrite/reference/combine_cols_omv.html Assigning a sample dataset to a variable for processing. ```R dtaInp <- jmvReadWrite::bfi_sample2 ``` -------------------------------- ### replace_omv Usage Examples Source: https://sjentsch.github.io/jmvReadWrite/reference/replace_omv.html Examples demonstrating how to replace values in a data frame, write the output to a file, and verify the changes. ```R if (FALSE) { # \dontrun{ bfi_sample <- jmvReadWrite::bfi_sample # the gender in the original data file is plural... table(bfi_sample$gender) # and shall be converted to singular rplDF <- jmvReadWrite::replace_omv(dtaInp = bfi_sample, rplLst = list(c("Females", "Female"), c("Males", "Male"))) table(rplDF$gender) # with giving an output file name, the data set is written nmeOut <- tempfile(fileext = ".omv") jmvReadWrite::replace_omv(bfi_sample, fleOut = nmeOut, rplLst = list(c("Females", "Female"), c("Males", "Male"))) file.exists(nmeOut) rplDF <- jmvReadWrite::read_omv(nmeOut) table(rplDF$gender) unlink(nmeOut) # it is sensible to check / search for the original values before running replace_omv jmvReadWrite::search_omv(bfi_sample, 24, whlTrm = TRUE) rplDF <- jmvReadWrite::replace_omv(bfi_sample, rplLst = list(c(24, NA))) table(rplDF$age) } # } ``` -------------------------------- ### Create a jamovi file with metadata using describe_omv Source: https://sjentsch.github.io/jmvReadWrite/reference/describe_omv.html This example demonstrates how to prepare a data frame and a metadata list to generate a .omv file. ```R dtaFrm <- jmvReadWrite::ToothGrowth[, c("len", "supp", "dose")] nmeOut <- tempfile(fileext = ".omv") # the paste's underneath are only for readability (without them, the vignettes are misformatted) 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) ``` -------------------------------- ### Install jmvReadWrite Source: https://sjentsch.github.io/jmvReadWrite/index.html Commands to install the package from CRAN or the development version from GitHub. ```R install.packages("jmvReadWrite") ``` ```R if (!require(devtools)) install.packages("devtools") devtools::install_github("sjentsch/jmvReadWrite") ``` -------------------------------- ### Sort a jamovi data file Source: https://sjentsch.github.io/jmvReadWrite/reference/sort_omv.html Example demonstrating how to sort an existing .omv file by a specific variable and verify the output. ```R nmeInp <- system.file("extdata", "AlbumSales.omv", package = "jmvReadWrite") nmeOut <- tempfile(fileext = ".omv") jmvReadWrite::sort_omv(dtaInp = nmeInp, fleOut = nmeOut, varSrt = "Image") dtaFrm <- jmvReadWrite::read_omv(nmeOut) unlink(nmeOut) cat(dtaFrm$Image) ``` -------------------------------- ### Combine split columns into a single variable Source: https://sjentsch.github.io/jmvReadWrite/reference/combine_cols_omv.html This example shows how to create a subset column, move values, and then use combine_cols_omv to merge them back together. ```R set.seed(1) selRow <- rnorm(nrow(dtaInp)) < 0 dtaInp[selRow, "A1_1"] <- dtaInp[selRow, "A1"] dtaInp[selRow, "A1"] <- NA head(dtaInp[, c("A1", "A1_1")]) dtaOut <- combine_cols_omv(dtaInp, varPrs = list(c("A1", "A1_1"))) dtaInp[, "A1"] dtaOut[, "A1"] all(dtaOut[, "A1"] == jmvReadWrite::bfi_sample2[, "A1"]) ``` -------------------------------- ### Merge multiple datasets into a single jamovi file Source: https://sjentsch.github.io/jmvReadWrite/reference/merge_cols_omv.html This example demonstrates how to prepare three RDS files and merge them into a single .omv file using a common ID column. ```R dtaInp <- jmvReadWrite::bfi_sample2 nmeInp <- paste0(tempfile(), "_", 1:3, ".rds") nmeOut <- tempfile(fileext = ".omv") for (i in seq_along(nmeInp)) { saveRDS(stats::setNames(dtaInp, c("ID", paste0(names(dtaInp)[-1], "_", i))), nmeInp[i]) } # save dtaInp three times (i.e., the length of nmeInp), adding "_" + 1 ... 3 as index # to the data variables (A1 ... O5, gender, age → A1_1, ...) jmvReadWrite::merge_cols_omv(dtaInp = nmeInp, fleOut = nmeOut, varBy = "ID") cat(file.info(nmeOut)$size) #> 16376 # -> 17731 (size may differ on different OSes) dtaOut <- jmvReadWrite::read_omv(nmeOut, sveAtt = FALSE) # read the data set where the three original datasets were added as columns and show # the variable names cat(names(dtaOut)) #> ID A1_1 A2_1 A3_1 A4_1 A5_1 C1_1 C2_1 C3_1 C4_1 C5_1 E1_1 E2_1 E3_1 E4_1 E5_1 N1_1 N2_1 N3_1 N4_1 N5_1 O1_1 O2_1 O3_1 O4_1 O5_1 gender_1 age_1 ID2_1 A1_2 A2_2 A3_2 A4_2 A5_2 C1_2 C2_2 C3_2 C4_2 C5_2 E1_2 E2_2 E3_2 E4_2 E5_2 N1_2 N2_2 N3_2 N4_2 N5_2 O1_2 O2_2 O3_2 O4_2 O5_2 gender_2 age_2 ID2_2 A1_3 A2_3 A3_3 A4_3 A5_3 C1_3 C2_3 C3_3 C4_3 C5_3 E1_3 E2_3 E3_3 E4_3 E5_3 N1_3 N2_3 N3_3 N4_3 N5_3 O1_3 O2_3 O3_3 O4_3 O5_3 gender_3 age_3 ID2_3 cat(names(dtaInp)) #> ID A1 A2 A3 A4 A5 C1 C2 C3 C4 C5 E1 E2 E3 E4 E5 N1 N2 N3 N4 N5 O1 O2 O3 O4 O5 gender age ID2 ``` -------------------------------- ### Transforming data from long to wide format Source: https://sjentsch.github.io/jmvReadWrite/reference/long2wide_omv.html This example demonstrates generating a test dataframe, saving it as an RDS file, and converting it to a wide-format jamovi file using long2wide_omv. ```R # generate a test dataframe with 100 (imaginary) participants / units of # observation (ID), 8 measurement (measure) of one variable (X) dtaInp <- data.frame(ID = rep(as.character(seq(1, 100)), each = 8), measure = rep(seq(1, 8), times = 100), X = runif(800, -10, 10)) cat(str(dtaInp)) #> 'data.frame': 800 obs. of 3 variables: #> $ ID : chr "1" "1" "1" "1" ... #> $ measure: int 1 2 3 4 5 6 7 8 1 2 ... #> $ X : num -6.758 -0.492 -9.961 -1.171 -4.781 ... # the output should look like this # 'data.frame': 800 obs. of 3 variables: # $ ID : chr "1" "1" "1" "1" ... # $ measure: int 1 2 3 4 5 6 7 8 1 2 ... # $ X : num ... # this data set is stored as (temporary) RDS-file and later processed by long2wide nmeInp <- tempfile(fileext = ".rds") nmeOut <- tempfile(fileext = ".omv") saveRDS(dtaInp, nmeInp) jmvReadWrite::long2wide_omv(dtaInp = nmeInp, fleOut = nmeOut, varTgt = "X", varID = "ID", varTme = "measure") ``` -------------------------------- ### Extract and Execute Analysis Syntax Source: https://sjentsch.github.io/jmvReadWrite/index.html Retrieves and executes analysis syntax stored as attributes within a jamovi data object. Requires the jmv package to be installed for execution. ```R if (length(attr(data, "syntax")) >= 2) { attr(data, "syntax") # if the "jmv"-package is installed, we can run the analyses in "syntax" if ("jmv" %in% rownames(installed.packages())) { eval(parse(text = attr(data, "syntax")[[1]])) eval(parse(text = paste0("result = ", attr(data, "syntax")[[2]]))) names(result) # -> "main" "assump" "contrasts" "postHoc" "emm" # (the names of the five output tables) } } ``` -------------------------------- ### Read .omv files and run analysis Source: https://sjentsch.github.io/jmvReadWrite/index.html Demonstrates reading a jamovi data file and executing an ANOVA using the jmv package. ```R fleOMV <- system.file("extdata", "ToothGrowth.omv", package = "jmvReadWrite") data <- jmvReadWrite::read_omv(fleOMV) # if the "jmv"-package is installed, we can run a test analysis with the data if ("jmv" %in% rownames(installed.packages())) { jmv::ANOVA( formula = len ~ supp + dose + supp:dose, data = data, effectSize = c("omega"), modelTest = TRUE, homo = TRUE, norm = TRUE) } ``` -------------------------------- ### Define output file path Source: https://sjentsch.github.io/jmvReadWrite/reference/write_omv.html Create a temporary file path with the .omv extension for use with write_omv. ```R nmeOut <- tempfile(fileext = ".omv") ``` -------------------------------- ### Read .omv file with syntax extraction Source: https://sjentsch.github.io/jmvReadWrite/reference/read_omv.html Imports a jamovi file and attempts to extract the associated analysis syntax. Requires jmvcore and RProtoBuf packages. ```R if (FALSE) { # \dontrun{ data <- jmvReadWrite::read_omv(fleInp = nmeInp, getSyn = TRUE) } # } ``` -------------------------------- ### Merge multiple jamovi files by rows Source: https://sjentsch.github.io/jmvReadWrite/reference/merge_rows_omv.html Demonstrates creating sample RDS files and merging them into a single .omv file using merge_rows_omv. ```R dtaInp <- jmvReadWrite::bfi_sample2 nmeInp <- paste0(tempfile(), "_", 1:3, ".rds") nmeOut <- tempfile(fileext = ".omv") for (i in seq_along(nmeInp)) saveRDS(dtaInp[-i - 1], nmeInp[i]) # save dtaInp three times (i.e., the length of nmeInp), removing one data columns in # each data set (for demonstration purposes, A1 in the first, A2 in the second, ...) jmvReadWrite::merge_rows_omv(dtaInp = nmeInp, fleOut = nmeOut, colInd = TRUE) cat(file.info(nmeOut)$size) #> 10936 # -> 10767 (size may differ on different OSes) dtaOut <- jmvReadWrite::read_omv(nmeOut, sveAtt = FALSE) unlink(nmeOut) # read the data set where the three original datasets were added as rows and show # the variable names cat(names(dtaInp)) #> ID A1 A2 A3 A4 A5 C1 C2 C3 C4 C5 E1 E2 E3 E4 E5 N1 N2 N3 N4 N5 O1 O2 O3 O4 O5 gender age ID2 cat(names(dtaOut)) #> fleInd ID A2 A3 A4 A5 C1 C2 C3 C4 C5 E1 E2 E3 E4 E5 N1 N2 N3 N4 N5 O1 O2 O3 O4 O5 gender age ID2 A1 # compared to the input data set, we have the same variable names; fleInd (switched ``` -------------------------------- ### Verify OMV File Creation Source: https://sjentsch.github.io/jmvReadWrite/reference/aggregate_omv.html Check the existence and size of the generated OMV file. ```R cat(list.files(dirname(nmeOut), basename(nmeOut))) cat(file.info(nmeOut)$size) ``` -------------------------------- ### Inspect variable labels in OMV file Source: https://sjentsch.github.io/jmvReadWrite/reference/label_vars_omv.html Loads a sample OMV file and checks the current variable description attributes. ```R nmeInp <- system.file("extdata", "bfi_sample.omv", package = "jmvReadWrite") dtaInp <- jmvReadWrite::read_omv(nmeInp)[1:28] nmeOut <- tempfile(fileext = ".omv") # in the original file, the variable labels – attr(*, "jmv-desc") - are empty lapply(dtaInp, attr, "jmv-desc") ``` -------------------------------- ### Extracting Analysis Syntax from .omv Files Source: https://sjentsch.github.io/jmvReadWrite/articles/jmvReadWrite.html Use getSyn = TRUE to extract syntax from jamovi analyses stored within an .omv file. Syntax is accessible via the 'syntax' attribute of the returned data object. ```R fleOMV <- system.file("extdata", "ToothGrowth.omv", package = "jmvReadWrite") data <- jmvReadWrite::read_omv(fleOMV, getSyn = TRUE) # shows the syntax of the analyses from the .omv-file # please note that syntax extraction may not work on all systems # if the syntax couldn't be extracted, an empty list (length = 0) is returned, # otherwise, the syntax of the analyses from the .omv-file is shown and # the commands of the first and the second analysis are run, with the # output of the second analysis assigned to the variable result if (length(attr(data, "syntax")) >= 2) { attr(data, "syntax") # if the "jmv"-package is installed, we can run the analyses in "syntax" if ("jmv" %in% rownames(installed.packages())) { eval(parse(text = attr(data, "syntax")[[1]])) eval(parse(text = paste0("result = ", attr(data, "syntax")[[2]]))) names(result) # -> "main" "assump" "contrasts" "postHoc" "emm" # (the names of the five output tables) } } ``` -------------------------------- ### convert_to_omv(fleInp, fleOut, varSrt, usePkg, selSet, ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/convert_to_omv.html Converts a specified input data file into a jamovi .omv file. This function supports various file formats and allows for sorting and package selection for reading specific file types. ```APIDOC ## convert_to_omv ### Description Converts data files (CSV, R, and other statistics packages) into .omv-files for the statistical spreadsheet 'jamovi'. ### Usage convert_to_omv(fleInp = "", fleOut = "", varSrt = c(), usePkg = c("foreign", "haven"), selSet = "", ...) ### Arguments - **fleInp** (string) - Name (including path) of the input data file. - **fleOut** (string) - Name (including path) of the output .omv file. If empty, the input extension is replaced with .omv. - **varSrt** (vector) - Variable(s) used to sort the data frame. - **usePkg** (vector) - Package to use for reading SPSS, Stata, and SAS files ("foreign" or "haven"). - **selSet** (string) - Name of the data set to select from the workspace (applies to .RData files). - **...** (dots) - Additional arguments passed to internal reading and writing functions. ### Value Returns NULL. ``` -------------------------------- ### Verify File Creation and Cleanup Source: https://sjentsch.github.io/jmvReadWrite/reference/write_omv.html Checks for the existence of the written file on disk and removes it after verification. ```R print(list.files(dirname(nmeOut), basename(nmeOut))) print(file.info(nmeOut)$size) unlink(nmeOut) ``` -------------------------------- ### Extract syntax from .omv files Source: https://sjentsch.github.io/jmvReadWrite/index.html Retrieves analysis syntax stored within an .omv file by setting the getSyn parameter to TRUE. ```R fleOMV <- system.file("extdata", "ToothGrowth.omv", package = "jmvReadWrite") data <- jmvReadWrite::read_omv(fleOMV, getSyn = TRUE) ``` -------------------------------- ### Generate jamovi file description with formatting Source: https://sjentsch.github.io/jmvReadWrite/reference/describe_omv.html Uses HTML tags to apply various styles like bold, italics, lists, and alignment to the jamovi file description. ```R # 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) chrDsc <- paste0("

Trial - all formattings:
bold
", "bold, italics
italics
underlined", "
strikethrough
C2H5OH
R2", "
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", "


  1. numbered list
  2. numbered list


", "

", "indented once

indented twice

indented once

Formula: ", "e=mc^2

Preformatted

normal again

Heading

") jmvReadWrite::describe_omv(dtaInp = dtaFrm, fleOut = nmeOut, dtaTtl = "ToothGrowth", dtaDsc = chrDsc) unlink(nmeOut) ``` -------------------------------- ### Apply and Verify Variable Labels Source: https://sjentsch.github.io/jmvReadWrite/reference/label_vars_omv.html Applies variable labels from a file to an OMV dataset and reads back the descriptions to verify the changes. ```R jmvReadWrite::label_vars_omv(dtaInp = dtaInp, fleOut = nmeOut, varLbl = lblFle) lapply(jmvReadWrite::read_omv(nmeOut), attr, "jmv-desc") unlink(nmeOut) ``` -------------------------------- ### merge_cols_omv(dtaInp = NULL, fleOut = "", typMrg = c("outer", "inner", "left", "right"), varBy = list(), varSrt = c(), psvAnl = FALSE, usePkg = c("foreign", "haven"), selSet = "", ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/merge_cols_omv.html Merges two or more data files by adding the content of other input files as columns to the first input file and outputs them as files for the statistical spreadsheet 'jamovi'. ```APIDOC ## merge_cols_omv ### Description Merges two or more data files by adding the content of other input files as columns to the first input file and outputs them as files for the statistical spreadsheet 'jamovi'. ### Arguments - **dtaInp** (data frame or vector) - Optional - Either a data frame (with the attribute "fleInp" containing the files to merge) or vector with the names of the input files. - **fleOut** (string) - Optional - Name of the data file to be written; if empty, the resulting data frame is returned instead. - **typMrg** (string) - Optional - Type of merging operation: "outer" (default), "inner", "left" or "right". - **varBy** (list) - Optional - Name of the variable by which the data sets are matched. - **varSrt** (vector) - Optional - Variable(s) that are used to sort the data frame. - **psvAnl** (boolean) - Optional - Whether analyses that are contained in the input file shall be transferred to the output file. - **usePkg** (string) - Optional - Name of the package: "foreign" or "haven" that shall be used to read SPSS, Stata and SAS files. - **selSet** (string) - Optional - Name of the data set that is to be selected from the workspace (only applies when reading .RData-files). - **...** (dots) - Optional - Additional arguments passed on to methods. ``` -------------------------------- ### Verify OMV file creation and structure Source: https://sjentsch.github.io/jmvReadWrite/reference/long2wide_omv.html Checks the existence and size of the generated OMV file, then reads and displays the structure of the transformed data frame. ```R cat(list.files(dirname(nmeOut), basename(nmeOut))) cat(file.info(nmeOut)$size) cat(str(jmvReadWrite::read_omv(nmeOut, sveAtt = FALSE))) ``` -------------------------------- ### transform_vars_omv(dtaInp = NULL, fleOut = "", varXfm = NULL, psvAnl = FALSE, usePkg = c("foreign", "haven"), selSet = "", ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/transform_vars_omv.html Transforms skewed variables in a dataset and returns the result or writes it to a file. ```APIDOC ## transform_vars_omv ### Description Transforms skewed variables in a dataset to better conform to a normal distribution. The function can either return a modified data frame or write the results directly to a file. ### Parameters - **dtaInp** (data frame or string) - Optional - Either a data frame or the name of a data file to be read. - **fleOut** (string) - Optional - Name of the data file to be written. If empty, the resulting data frame is returned. - **varXfm** (list) - Optional - A named list where the name indicates the transformation type and the entry points to the variables to be transformed. - **psvAnl** (boolean) - Optional - Whether analyses contained in the input file should be transferred to the output file (default: FALSE). - **usePkg** (string) - Optional - The package to use for reading SPSS, Stata, and SAS files ("foreign" or "haven"). - **selSet** (string) - Optional - Name of the data set to select from the workspace (only for .RData files). - **...** (dots) - Optional - Additional arguments passed to internal read/write methods. ### Value A data frame (if fleOut is empty) with re-arranged variables. ``` -------------------------------- ### Generate test dataframe for aggregation Source: https://sjentsch.github.io/jmvReadWrite/reference/aggregate_omv.html Creates a sample dataframe with 100 participants and 10 measurements per variable to demonstrate aggregation workflows. ```R # generate a test dataframe with 100 (imaginary) participants / units of # observation (ID), 10 measurement (measure) of two variables (V1, V2) dtaInp <- data.frame(ID = rep(as.character(seq(1, 100)), each = 10), Measure = rep(seq(1, 10), times = 100), V1 = runif(1000, 0, 100), V2 = round(rnorm(1000, 100, 15))) cat(str(dtaInp)) ``` -------------------------------- ### Transform wide data to long format with wide2long_omv Source: https://sjentsch.github.io/jmvReadWrite/reference/wide2long_omv.html Demonstrates generating a test data frame, saving it as an RDS file, and converting it to a long-format jamovi file. ```R if (FALSE) { # \dontrun{ # generate a test dataframe with 100 (imaginary) participants / units of # observation (ID), and 8 repeated measurements of variable (X_1, X_2, ...) dtaInp <- cbind(data.frame(ID = as.character(seq(1:100))), stats::setNames( as.data.frame(matrix(runif(800, -10, 10), nrow = 100)), paste0("X_", 1:8))) cat(str(dtaInp)) # 'data.frame': 100 obs. of 9 variables: # $ ID : chr "1" "2" "3" "4" ... # $ X_1: num ... # $ X_2: num ... # $ X_3: num ... # $ X_4: num ... # $ X_5: num ... # $ X_6: num ... # $ X_7: num ... # $ X_8: num ... # this data set is stored as (temporary) RDS-file and later processed by wide2long nmeInp <- tempfile(fileext = ".rds") nmeOut <- tempfile(fileext = ".omv") saveRDS(dtaInp, nmeInp) jmvReadWrite::wide2long_omv(dtaInp = nmeInp, fleOut = nmeOut, varID = "ID", varTme = "measure", varLst = setdiff(names(dtaInp), "ID"), varSrt = c("ID", "measure")) ``` -------------------------------- ### describe_omv(dtaInp, fleOut, dtaTtl, dtaDsc, lngDsc, usePkg, selSet, ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/describe_omv.html Adds a title and a description for a data set stored as an .omv-file for the jamovi statistical spreadsheet. ```APIDOC ## describe_omv ### Description Adds a title and a description for a data set stored as an .omv-file for the statistical spreadsheet 'jamovi'. ### Usage ```R describe_omv(dtaInp = NULL, fleOut = "", dtaTtl = c(), dtaDsc = c(), lngDsc = "EN", usePkg = c("foreign", "haven"), selSet = "", ...) ``` ### Arguments - **dtaInp** (data frame or character) - Optional - Either a data frame or the name of a data file to be read. - **fleOut** (character) - Optional - Name of the data file to be written; if empty, the resulting data frame is returned. - **dtaTtl** (character vector) - Optional - A title to be added to the data set. - **dtaDsc** (character vector or list) - Optional - Description of the data set, either as HTML-formatted character vector or a named list. - **lngDsc** (character) - Optional - Language of the description (default: "EN"). - **usePkg** (character) - Optional - Package to use for reading SPSS, Stata, and SAS files ("foreign" or "haven"). - **selSet** (character) - Optional - Name of the data set to be selected from the workspace (applies to .RData files). - **...** - Optional - Additional arguments passed on to methods. ``` -------------------------------- ### read_omv(fleInp, getSyn = FALSE) Source: https://sjentsch.github.io/jmvReadWrite/reference/read_omv.html Reads a jamovi (.omv) file and returns a data frame containing the data and jamovi attributes. Optionally extracts the analysis syntax. ```APIDOC ## read_omv(fleInp, getSyn = FALSE) ### Description Reads a jamovi (.omv) file into an R data frame. The returned object includes jamovi-specific attributes and can optionally include the syntax used for analyses. ### Parameters - **fleInp** (string) - Required - The path to the .omv file to be read. - **getSyn** (boolean) - Optional - If TRUE, attempts to extract the syntax used to generate analyses within the file. Requires jmvcore and RProtoBuf. ### Response - **data.frame** (object) - A data frame containing the dataset, with jamovi attributes attached as metadata. If getSyn is TRUE, the 'syntax' attribute may be populated. ``` -------------------------------- ### write_omv() Source: https://sjentsch.github.io/jmvReadWrite/reference/index.html Writes data to files compatible with the jamovi statistical spreadsheet. ```APIDOC ## write_omv() ### Description Writes files to be used with the statistical spreadsheet 'jamovi'. ``` -------------------------------- ### read_omv() Source: https://sjentsch.github.io/jmvReadWrite/reference/index.html Reads files created by the jamovi statistical spreadsheet. ```APIDOC ## read_omv() ### Description Reads files created by the statistical spreadsheet 'jamovi'. ``` -------------------------------- ### combine_cols_omv(dtaInp, fleOut, varPrs, mdeCmb, psvAnl, usePkg, selSet, ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/combine_cols_omv.html Combines pairs of columns from a raw data matrix in .omv-files for the statistical spreadsheet 'jamovi'. ```APIDOC ## combine_cols_omv ### Description Combines pairs of columns from a raw data matrix in .omv-files for the statistical spreadsheet 'jamovi'. ### Parameters - **dtaInp** (data frame or string) - Optional - Either a data frame or the name of a data file to be read. - **fleOut** (string) - Optional - Name of the data file to be written; if empty, the resulting data frame is returned. - **varPrs** (list) - Optional - Definition of variable pairs to be combined. - **mdeCmb** (string) - Optional - Mode of combining variables when conflicting values occur: "none", "first", or "second". - **psvAnl** (boolean) - Optional - Whether analyses contained in the input file shall be transferred to the output file. - **usePkg** (string) - Optional - Name of the package to use for reading files: "foreign" or "haven". - **selSet** (string) - Optional - Name of the data set to be selected from the workspace (applies to .RData-files). - **...** (dots) - Optional - Additional arguments passed to reading and writing methods. ### Returns - **data frame** - A data frame containing the combined column pairs with original columns removed. ``` -------------------------------- ### write_omv(dtaFrm = NULL, fleOut = "", wrtPtB = FALSE, frcWrt = FALSE, retDbg = FALSE, vldExt = TRUE) Source: https://sjentsch.github.io/jmvReadWrite/reference/write_omv.html Writes a data frame to a jamovi (.omv) file. ```APIDOC ## write_omv ### Description Writes a data frame to be used with the statistical spreadsheet 'jamovi'. ### Arguments - **dtaFrm** (data.frame) - Optional - Data frame to be exported (default: NULL). - **fleOut** (string) - Optional - Name or position of the output file to be generated ("FILENAME.omv"; default: ""). - **wrtPtB** (boolean) - Optional - Whether to write protocol buffers (default: FALSE). - **frcWrt** (boolean) - Optional - Whether to overwrite existing files with the same name (default: FALSE). - **retDbg** (boolean) - Optional - Whether to return a list with debugging information (default: FALSE). - **vldExt** (boolean) - Optional - Whether to validate that the file name has a correct extension (default: TRUE). ### Value Returns a list (if retDbg == TRUE) containing the meta data (mtaDta), the extended data (xtdDta), and the original data frame (dtaFrm). ``` -------------------------------- ### describe_omv(dtaInp, fleOut, dtaTtl, dtaDsc, ...) Source: https://sjentsch.github.io/jmvReadWrite/reference/describe_omv.html Adds a title and a data set description to jamovi data files. If fleOut is empty, it returns a data frame with the description and title added. ```APIDOC ## describe_omv(dtaInp, fleOut, dtaTtl, dtaDsc, ...) ### Description Adds a title and a data set description to jamovi data files. This is useful for preparing datasets for teaching or publishing in repositories like the OSF. ### Parameters - **dtaInp** (data frame/file path) - Required - The input data frame or path to the data file. - **fleOut** (string) - Optional - The path to the output file. If empty, the function returns a data frame. - **dtaTtl** (string) - Required - The title for the dataset. - **dtaDsc** (string/list) - Required - A description of the dataset. Can be a character vector (HTML-formatted) or a named list containing 'description', 'variables', 'references', and 'license'. - **...** (dots) - Optional - Additional arguments passed to underlying read/write functions (e.g., read_omv, write_omv, read.table, etc.). ```