New to R btw so I am sorry if it seems like a stupid question. So basically I have a dataframe with 100 rows and 3 different columns of data. I also have a vector with 3 thresholds, one for each column. I was wondering how you would filter out the values of each column that are superior to the value of each threshold.
Edit: Sry for the incomplete question. So essentially what i would like to create is a function (that takes a dataframe and a vector of tresholds as parameters) that applies every treshold to their respective column of the dataframe (so there is one treshhold for every column of the dataframe). The number of elements of each column that “respect” their treshold should later be put in a vector. So for example:
Column 1: values = 1,2,3. Treshold = (only values lower than 3) Column 2: values = 4,5,6. Treshold = (only values lower than 6) Output: A vector (2,2) since there are two elements in each column that are under their respective tresholds.
Thank you everyone for the help!!