Learn R Programming

fgeo.tool (version 1.2.9)

recode_subquad: Recode subquadrat.

Description

Recode subquadrat.

Usage

recode_subquad(data, offset = -1)

Value

A modified version of the input.

Arguments

data

A dataframe with the variable subquadrat.

offset

A number; either -1 or 1, to rest or add one unit to the number of column of each subquadrat.

First column is 0    First column is 1
-----------------    -----------------
   04 14 24 34          14 24 34 44
   03 13 23 33          13 23 33 43
   02 12 22 32          12 22 32 42
   01 11 21 31          11 21 31 41

Examples

Run this code
first_subquad_11 <- tibble(subquadrat = c("11", "12", "22"))
first_subquad_11

first_subquad_01 <- recode_subquad(first_subquad_11, offset = -1)
first_subquad_01

first_subquad_11 <- recode_subquad(first_subquad_01, offset = 1)
first_subquad_11

Run the code above in your browser using DataLab