Here's a repro script. Just start executing these line by line. The delay starts when you get to the line where you assign to dat or names. These are large-ish data sets and causes the REPL window to block since I'm guessing that the processing for displaying values in the variable explorer is happening on the UI thread.
install.packages("pacman")
library(pacman)
# load named packages - note the namespace (is that the right term for R?) qualifier
p_load(Lahman, dplyr)
# load the Lahman package, which contains the Lahman baseball stats database
# see http://www.seanlahman.com/baseball-archive/statistics/
p_load(Lahman)
# view the first few rows of the Master database
head(Master)
# get PITCHf/x data using the pitchRx package
# see http://cpsievert.github.io/pitchRx/
install.packages("pitchRx")
# looks like this just loads the package
library(pitchRx)
dat <- scrape(start = "2015-05-21", end = "2015-05-21")
# TODO: what is pitch_type? Is it a constant? What is the scope of this constant? Should we show IntelliSense for this?
locations <- select(dat$pitch, pitch_type, start_speed, px, pz, des, num, gameday_link)
# get the names
names <- select(dat$atbat, pitcher, batter, pitcher_name, batter_name, num, gameday_link, event, stand)
# join using a name
# TODO: what is the %>% operator?
data <- names %>% filter(pitcher_name == "Jacob DeGrom") %>% inner_join(locations, ., by = c("num", "gameday_link"))
# display pitch summary
head(data)
Here's a repro script. Just start executing these line by line. The delay starts when you get to the line where you assign to dat or names. These are large-ish data sets and causes the REPL window to block since I'm guessing that the processing for displaying values in the variable explorer is happening on the UI thread.