Invalid Path Argument Error for print()

Hi, and welcome. A reproducible example, called a reprex is much more helpful than a screenshot, for future reference.

Here's what might be happening:

PitcherName <- "Sandy Kolfax"
paste("WeeklyReport_", PitcherName, '_', ".html", sep='')
#> [1] "WeeklyReport_Sandy Kolfax_.html"

Created on 2019-12-17 by the reprex package (v0.3.0)

The blank between the first and last name creates a filename problem that could throw your error.

1 Like