R data.table code becomes more efficient — and elegant — when you take advantage of its special symbols and functions. With that in mind, we’ll look at some special ways to subset, count, and create new columns.
For this demo, I’m going to use data from the 2019 Stack Overflow developers survey, with about 90,000 responses. If you want to follow along, you can download the data from Stack Overflow.
If the data.table package is not installed on your system, install it from CRAN and then load it as usual with library(data.table)
. To start, you may want to read in just the first few rows of the data set to make it easier to examine the data structure. You can do that with with data.table’s fread()
function and the nrows
argument. I’ll read in 10 rows:
from InfoWorld https://ift.tt/2vCnPb2
No comments:
Post a Comment
hello friends how are you????????????