code_detect: Search for Stock Code by Company Name

Description Usage Arguments Value Examples

View source: R/code_detect.r

Description

It is a function to search the brand code from the company name. The stock code data uses the list of brands listed on the Tokyo Stock Exchange as of the end of December 2021 published by the JPX ( https://www.jpx.co.jp/markets/statistics-equities/misc/01.html). The data used inside the function can be confirmed by data(Brand Code). Concatenate vectors containing company names with | and return the matched company with the str_detect function of the stringr package.

Usage

1

Arguments

firm

a character vector. Specify company names

Value

return a list object. The "code" element contains a vector of stock codes. The "info" element contains the matched data.

Examples

1
2
3
find <- code_detect(c("APAMAN", "YU-WA Creation Holdings"))
find$code #extract brand code
find$info #extract matched data

KatoPachi/YahooFinance documentation built on Feb. 9, 2022, 3:22 p.m.