This is an amazing book!
I have a dog-eared, beaten up copy of the first edition. I've gone through it basically cover to cover twice, and used it many times as a reference. I believe this book is now on a second edition, which I haven't seen.
The book is geared towards people who are new to R, but I think even novice to intermediate level users of R will learn from the examples as well.
In addition to helping you learn R, you will learn where various data sources are for baseball info, and how to access it with some real examples. The book shows how to access each of: The Lahman Database (Season-by-Season data), Retrosheet data (game logs and play-by-play data which has outcomes of every pitch of every game for the last 100+ years) and Pitch f/x data (detailed data on every pitch since pitch f/x technology became available, showing things like velocity, movement, and location).
I think even if you are only a casual baseball fun, the book would be a fun way to learn R using real world examples and data.