Displaying 1 result from an estimated 1 matches for "egsub".
Did you mean:
gsub
2012 Dec 06
2
function to filter identical data.fames using less than (<) and greater than (>)
Esteemed UseRs,
I've got many biggish data frames which need a lot subsetting, like in
this example:
# example
eg <- data.frame(A = rnorm(10), B = rnorm(10), C = rnorm(10), D = rnorm(10))
egsub <- eg[eg$A < 0 & eg$B < 1 & eg$C > 0, ]
egsub
egsub2 <- eg[eg$A > 1 & eg$B > 0, ]
egsub2
# To make this clearer than 1000s of lines of extractions with []
# I tried to make a function like this:
# func(data="eg", A="< 0", B="< 1"...