The windows clipboard is a quick way to get data in and out of R. How can we exploit this feature to accomplish our basic data exploration needs and when might its use be inappropriate? Read on. Overview Paste Data from Clipboard to R HTML Tables Spreadsheets Copy Data from R to Clipboard Summary and Usage Notes Paste Data from Clipboard to R We won't be using it in this post, but you can see the contents of the Windows clipboard in R using the readClipboard() command. Going through the documentation you'll note a variety of formats that can be read. For our purposes, we are looking at moving text…


Infamous Inf – Part II
R’s Inf keyword – Have you’ve ever wondered what to do with it? If so, this is the second in series of posts that explore how we can exploit the keyword’s interesting properties to get the answers we need and improve code robustness. If you want to catch up on the first post where we look at Inf and the cut() function, please see Infamous Inf – Part I For those unfamiliar with R’s Inf keyword, it is defined as a positive or negative number divided by zero yielding positive or negative infinity, respectively. c(plus_inf = 1/0, minus_inf = 1/0) # plus_inf minus_inf # Inf Inf Sounds very theoretical. So…

Infamous Inf – Part I
R’s Inf keyword – Have you’ve ever wondered what to do with it? If so, this is the first in series of posts that explore how we can exploit the keyword’s interesting properties to get the answers we need and improve code robustness. For those unfamiliar with R’s Inf keyword, it is defined as a positive or negative number divided by zero yielding positive or negative infinity, respectively. c(plus_inf = 1/0, minus_inf = 1/0) # plus_inf minus_inf # Inf Inf Sounds very theoretical. So how we can make practical use of infinity in R? In this first post, we’ll be discussing how Inf can make binning data with cut() a…