Here's a small test with a built-in data set that might be the one you're also working from: fide Use ( tidyverse is not really needed for the package to work but IMO it prints the data frames more cleanly than the built-in base R print functions): library(pigeon) Install: devtools::install_github("hrbrmstr/pigeon") You'll need a R setup that enables compilation from source (i.e. I haven't tested this on Windows or Linux yet but the C codebase that the package is based on claims to be very portable. So is there a way to account for this in my regular expression? or a way to automatically change the file to make the pgn a single line? The issues here is my pgn information is multiple lines. I have attempted this with influence from R: How to read in a PGN as a Data Frame and have come up with: pgn <- read.table("~/Desktop/GitHub/Chess/test.pgn", quote="",Ĭolumn_names <- sub("\\) ![]() Then a separate column for the PGN string. I would like to create a data frame with this data where the column titles are the word to the left of each string, and the data is the string. The games are contained in the file like this: ġ. pgn (Portable Game Notation) of a large number of chess games.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |