R/addins.R

Defines functions runCC runTableCC runTable

runTable <- function() {
    context <- rstudioapi::getActiveDocumentContext()
    rstudioapi::sendToConsole(paste0("table(",context$selection[[1]]$text,")"), execute = TRUE)
}

runTableCC <- function() {
    context <- rstudioapi::getActiveDocumentContext()
    rstudioapi::sendToConsole(paste0("cc(table(",context$selection[[1]]$text,"))"), execute = TRUE)
}

runCC <- function() {
    context <- rstudioapi::getActiveDocumentContext()
    rstudioapi::sendToConsole(paste0("cc(",context$selection[[1]]$text,")"), execute = TRUE)
}
Dectech/DectechR documentation built on Feb. 15, 2024, 9:17 a.m.