json2batterdf: json file to batter dataframe

Description Usage Arguments Details Value Examples

View source: R/jsondata2batterdf.R

Description

This function changes batter data in json file to dataframe data

Usage

1
json2batterdf(jsondata, gameid)

Arguments

jsondata

KBO data json file

gameid

KBO game date and versus infomation

Details

## You can read the json file in the json_sample folder and use it. ## You can use fromJSON function of jsonlite package to read the json file. ## You can also get KBO full game json file. ## You can extract it from the "https://github.com/LOPES-HUFS/KBO_Data_Wrangling" project ## And work the code in the notebook file. ## If you got a json file through one of the above methods, ## you can open it and use it as an paremeter of the function. ## The gameid paremeter can be obtained through using the default function names.

Value

the batter dataframe data that is changed from json data file

Examples

1
2
3
4
## not run
## This example does not run the example because it requires a json file.
# jsondata <- jsonlite::fromJSON(./json_sample/Hanhwa_normalseason_2018.json)
# json2batterdf(jsondata,names(jsondata)[1])

choosunsick/kbodatamining documentation built on May 18, 2019, 1:30 p.m.