Ryo-N7 / soccer_ggplots

Soccer/football analytics blog posts & data viz from the World Cup, Premier League, Copa America, and beyond. Using ggplot2, ggsoccer, & more. (Est. June 2018) ****Please look at the README for best version of the code!****
https://ryo-n7.github.io
GNU Affero General Public License v3.0
166 stars 23 forks source link

Zero-length variable name error #1

Closed jesbrz closed 5 years ago

jesbrz commented 5 years ago

Hi @Ryo-N7. When I try to recreate liverpool_age_utility.rmd I got this message and no plot is show: "Error: attempt to use zero-length variable name" Any idea on where is the problem? Thanks!

jesbrz commented 5 years ago

Sorry I got a solution for this error, but found another one:

Error in theme_text(size = base_size, vjust = 1) : could not found function "theme_text"
3. mget(args, envir = env)
2. find_args(..., complete = NULL, validate = NULL)
1. theme(text = element_text(family = "Georgia"), axis.line = theme_blank(), axis.text.x = theme_text(size = base_size * 0.8, lineheight = 0.9, vjust = 1), axis.text.y = theme_text(size = base_size * 0.8, lineheight = 0.9, hjust = 1), axis.ticks = theme_segment(colour = "black", ...
jesbrz commented 5 years ago

The solution for theme_text is change to element_text, but then Error in structure(list(family = family, face = face, colour = colour, : object 'base_size' not found

Ryo-N7 commented 5 years ago

hey Jesus,

use the code in the gist: https://gist.github.com/Ryo-N7/5309ba2496b4f75a0747166bfbc52270

instead of the .RMD

I think you were trying to run the LFC custom theme I was trying to create but didn't even end up using in the final plot.

jesbrz commented 5 years ago

Fine now with the gist code. Thanks a lot Ryo, great job.

Ryo-N7 commented 5 years ago

cool cool, just make sure to check the readme for the best/latest code

a lot of my RMDs are still filled with notes and unfinished stuff