[R] HOW TO FILTER DATA
ruanleilei at gmail.com
Wed Jan 3 21:54:44 CET 2018
Try the code below:
df <- read_delim("C:/Users/lruan1/Desktop/1112.csv", "|", escape_double =
FALSE, trim_ws = TRUE)
df_new <- subset(df,df$IPC == 'H04M001/02'| df$IPC == 'C07K016/26' )
You can add more condition with "|" in the subset function. Good luck!
On Wed, Jan 3, 2018 at 2:53 PM, Saptorshee Kanto Chakraborty <
chkstr at unife.it> wrote:
> I have a data of Patents from OECD in delimited text format with IPC being
> one column, I want to filter the data by selecting only certain IPC in that
> column and delete other rows which do not have my required IPCs. Please,
> can anybody guide me doing it, also the IPC codes are string variables.
> The data is somewhat like below, but its a huge dataset containing more
> than 11 million rows
> Thanking You
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help