My personal website is under construction. Please check it later.
PhD Candidate in Economisc, current
Clemson University
Master in Economics, 2011
Renmin University of China
BS in Management, 2009
Renmin University of China
Rstudio provides view()
function. However, it has some restrictions. It slows down significantly as the nunber of rows increases. In addition, the number of rows are capped by 100 in the view panel.
The office introduction of View()
.link
Don’t use the same for the data.frame and variables in it.
library(data.table)
a <- data.table(a = c(1,2,3,1,2,3), b = c("a", "b", "a", "b","a", "b"))
b <- a[b == "b"]
data.table
cannot distinguish which b
is. b
represents data.table b
and the variable b
in data.table a
.
a[a %in% b$a]
Error in b$a : $ operator is invalid for atomic vectors
This is a collection of posts related to R.