make_hougan: Make vector _houganshi_

Description Usage Arguments Value Examples

View source: R/components.R

Description

This function returns vector houganshi to locate the position of target word (e.g. species name) in a Excel rows or columns. To keep correspondence between nubmer of cells and nchar of output string, This function replaces NA and a cell value with multiple characters.

Usage

1

Arguments

str

String vector with NA or multiple characters

Value

Long single string composed of single-word cell and whitespace

Examples

1
2
3
4
5
6
7
8
## Not run: 
  str <- rep(1:10, 10) %>%
    replace(which(. %% 3  == 0), NA) %>%
    replace(which(. %% 5  == 0), "foo") %>%
    as.character()
  make_hougan(str)

## End(Not run)

kikirinrin/lucifer documentation built on Nov. 10, 2021, 9:37 p.m.