R/rs_get_ind_first_selected_col.R

Defines functions rs_get_ind_first_selected_row rs_get_ind_first_selected_col

Documented in rs_get_ind_first_selected_col rs_get_ind_first_selected_row

#' Get index of the first column in the selection
#'
#' @export
rs_get_ind_first_selected_col <- function() {
    context <- rstudioapi::getActiveDocumentContext()
    start_pos <- context$selection[[1]]$range$start[2]
    start_pos
}

#' Get index of the first row in the selection
#'
#' @export
rs_get_ind_first_selected_row <- function() {
    context <- rstudioapi::getActiveDocumentContext()
    start_pos <- context$selection[[1]]$range$start[1]
    start_pos
}

Try the spAddins package in your browser

Any scripts or data that you put into this service are public.

spAddins documentation built on Dec. 15, 2017, 1:03 a.m.