Description Usage Arguments Value Note See Also Examples
codereadStatsFile is meant to parse the stats files located in a
world/stats dir (since Minecraft 1.7). It reads a <UUID>.json
file and
returns it as a data.frame
1 | readStatsFile(file, dropPrefixes = TRUE)
|
file |
The stats file (JSON) to parse, usually located in the server
world directory, e.g. |
dropPrefixes |
Strips the |
A data.frame
containing every stat contained in the file as a
column name
If you want to combine multiple data.frames
imported with this function,
you could do so using rbind.fill
, since it is very unlikely
that each data.frame
will have the same columns present, hence
rbind
is likely to fail.
Other res: stats2df
1 2 3 4 5 6 7 8 9 | ## Not run:
require(plyr) # For rbind.fill
playerstats <- data.frame()
for(file in dir("server/world/stats")){
stat <- readStatsFile(paste0("server/world/stats", file))
playerstats <<- rbind.fill(stat, playerstats)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.