I have a data frame with multiple columns, one of which (called: drift.N) is a series of TRUE’s and FALSES’s. How would I go about separating the “TRUE” rows from the “FALSE” rows or asking R to tell me which rows drift.N==”TRUE” ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have a data.frame called
df:gets you the subset of the data.frame where
column_nameequalsTRUE. To get theFALSEsubset:(spot the exclamation mark !), where ! is
NOT. To get the indices wherecolumn_nameisTRUE:Finally, I recommend you go online and download some basic R tutorials and work through them. This questions, and many other basics, will be treated in them. See e.g.: