r - How to filter an table by a value in row -
I am doing a script in and my data looks like this How can I filter only "C" or "A" or both or any other string? For only one, you can try: or Are: r which is the
csv file then To load my data I have to make these functions user
data & lt; - read.csv ("info.csv", colClasses = "character")
abcd ... 1 "A" 3 4 ... 5 "b" 7 8 ... 9 "c" 7 4 ... 9 "c" 2 5 ... 9 "a" 1 6 ...
Data Lonely and lieutenant; - Using the data [data $ B == "A",]
subset () command:
Data For the A or C, you can use the
% in% operator, and the Lieutenant-Subset (Data, B == "A")
data.ac> lt; - Data [data is $ B% C ("A", "C"),] , or
data.AC < - subset (data, B%% C ("A", "C"))
Comments
Post a Comment