Skip to content

rcUtilsis a library designed to streamline and enhance the functionality of REDCap projects. It contains reusable functions that simplify common tasks and improve code efficiency.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

jubilee2/rcUtils

Repository files navigation

rcUtils

Overview

rcUtils is an R library providing utility functions for parsing and analyzing log data.

Functions

logDetailsParseDQ

Parses data query log details into a structured format.

logDetailsParseRecord

Extracts key-value pairs from log details.

logDetailsParseRecordInstance

Extracts instance numbers from log details.

logFilter

Filters log actions based on specified types.

queryLogSummary

Summarizes query logs by extracting relevant information.

Installation

# Install from GitHub
devtools::install_github("jubilee2/rcUtils")

Usage

library(rcUtils)

# Example log data
log <- data.frame(
  timestamp = Sys.time(),
  username = "user123",
  details = c(
    "Open data query",
    "Send data query back for further attention",
    "Open data query (Record: 1, Event: \"Event 1\")",
    "[instance = 123] name = 'Jane', age = '25', hobbies(2) = unchecked"
  )
)

# Summarize query logs
summary <- queryLogSummary(log)
print(summary)

# Parse log details
log$detailObj <- logDetailsParseRecord(log$details)
log$detailObj <- logDetailsParseDQ(log$details)

# Extract instance numbers
log$instance <- logDetailsParseRecordInstance(log$details)

# Filter log actions
types <- c("manage", "export")
selected <- logFilter(log$actions, types)
log[selected,]

Features

  • logDetailsParseDQ: Parses data query log details into a structured format.
  • logDetailsParseRecord: Extracts key-value pairs from log details.
  • logDetailsParseRecordInstance: Extracts instance numbers from log details.
  • logFilter: Filters log actions based on specified types.
  • queryLogSummary: Summarizes query logs.

Documentation

For detailed documentation, visit our Wiki.

Contributing

Contributions are welcome! Please submit issues or pull requests on GitHub.

License

rcUtils is licensed under the MIT License.

About

rcUtilsis a library designed to streamline and enhance the functionality of REDCap projects. It contains reusable functions that simplify common tasks and improve code efficiency.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages