stats2df: Produce a dataframe with playerstats

Description Usage Arguments Details Value Note See Also Examples

Description

stats2df converts an imported playerstats API object (list) to a data.frame.

Usage

1
stats2df(data, people = activePeople, type = "default")

Arguments

data

A list object containing playerstats as imported by fromJSON

people

The dataset containing the people information, defaults to using activePeople

type

The type of dataset: default or achievements. Defaults to default, which is fine for general, entity and item stats.

Details

The object must have been imported with fromJSON beforehand. To work with achievement datasets, the strings.achievements data needs to be accessible. For the API, see the Wurstmineberg Minecraft API.

Value

A data.frame containing playerstats

Note

Relies on strings.biomes for achievements data for classifications. If you want to convert a player's stats JSON file to a data.frame, see readStatsFile.

See Also

Other res: readStatsFile

Examples

1
2
3
4
5
## Not run: 
generalstats.list <- fromJSON("http://api.wurstmineberg.de/server/playerstats/general.json")
generalstats.df   <- stats2df(generalstats.list)

## End(Not run)

jemus42/wurstmineR documentation built on May 19, 2019, 4:03 a.m.