Top "Data.table" questions

The R data.

Error: package or namespace load failed for ggplot2 and for data.table

I am not able to open install the ggplot2 and data.table packages. It gives me the following error (example …

r ggplot2 data.table
Select multiple columns in data.table by their numeric indices

How can we select multiple columns using a vector of their numeric indices (position) in data.table? This is how …

r data.table
Aggregate / summarize multiple variables per group (e.g. sum, mean)

From a data frame, is there a easy way to aggregate (sum, mean, max et c) multiple variables simultaneously? Below …

r dataframe data.table aggregate r-faq
Sort rows in data.table in decreasing order on string key `order(-x,v)` gives error on data.table 1.9.4 or earlier

Let's say I have the following data.table in R: library(data.table) DT = data.table(x=rep(c("b","…

r string sorting data.table key
How do you delete a column by name in data.table?

To get rid of a column named "foo" in a data.frame, I can do: df <- df[-grep(…

r data.table
data.table vs dplyr: can one do something well the other can't or does poorly?

Overview I'm relatively familiar with data.table, not so much with dplyr. I've read through some dplyr vignettes and examples …

r data.table dplyr
How to replace NA values in a table for selected columns

There are a lot of posts about replacing NA values. I am aware that one could replace NAs in the …

r replace dataframe data.table na
Replace logical values (TRUE / FALSE) with numeric (1 / 0)

I am exporting data from R with the command: write.table(output,file = "data.raw", na "-9999", sep = "\t", row.…

r dataframe type-conversion data.table
Cleaning `Inf` values from an R dataframe

In R, I have an operation which creates some Inf values when I transform a dataframe. I would like to …

r dataframe data.table
Select subset of columns in data.table R

I have a data table with a bunch of columns, e.g.: dt<-data.table(matrix(runif(10*10),10,10)) I want …

r data.table