Delete rows based on first occurence of value in R -


so have issue row deletion. i'm after delete rows after first occurrence of value 1 in df$c. needs happen every value in df$a , every value in df$b, if that's clear. below example of df. appreciated!

a b c 1 1 0 1 1 0 1 1 1 1 1 0 1 1 0 1 2 0 1 2 1 2 1 0 2 1 1 2 1 0 

an alternative answer problem using statement...

new.df=my.df[1:which(my.df$c==1)[1],] 

in way can check logical operations on data


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -