I'm new with R and I need to solve this problem, I have a dataframe with column names that have this pattern:
#Example
¦ 1.1 ¦ 1.2 ¦ 1.3 ¦ 2.1 ¦ 2.2 ¦ 2.3 ¦ 3.1 ¦ 3.2 ¦ 3.3 ¦
How can I delete all the columns in the dataframe whose names have this condition:
#Suppose x.y colname
(x.y)
if x>y => delete column
After:
¦ 1.1 ¦ 1.2 ¦ 1.3 ¦ 2.2 ¦ 2.3 ¦ 3.3 ¦
Here's the output of dput(head(x)) where x is my df:
"Código UNU" is just an ID
I tried with grep but I couldn't do it. All help will be welcome and grateful!