unclusterize: Extract data clusters from data frame using the keyword

Description Usage Arguments

View source: R/shapetools.R

Description

This function extracts data clusters from single Excel sheet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
unclusterize(
  df,
  regex,
  direction,
  pos,
  offset = c(0, 0),
  ends,
  info = NULL,
  crop = NULL
)

Arguments

df

Data frame to be processed

regex

Regular expression to match keywords

direction

Directoin of the cluster revolution

pos

Positon of row/column to scan using regex

offset

The offset (c(row, pos)) of the cluster topleft from the coordination of keyword

ends

List of regex to locate row- and column- ends of each cluster Form should be like ends = list(row = "2019", col = "[Dd]ecember$"). Regex row = must specify the end of 'left most' columnn of df, not that of the column with key matched by regex

info

Parameters to make key:value list such as

key_offset

Offset c(row, col) of key topleft from df topleft. If NULL, automatically set to keyn

key_dim

Dimension c(row, col) of key

value_offset

Offset c(row, col) of value topleft from df topleft

value_dim

Dimension c(row, col) of value

crop

Params from crop() in list format


Rindrics/lucifer documentation built on Dec. 18, 2021, 10:50 a.m.