0

I'm working on a macbook pro with Rstudio Versión 2023.03.1+446 (2023.03.1+446) only with standard packages

I have a data frame who repeat the three column.names 50 times,I want to extract by name only the columns with "Intensidad" column name but my variable rename my columns like

23.3040, H...M...NB, Intesidad, 34.456, H...M...NB.2, Intesidad.2, H...M...NB.3, Intesidad.3

I tried with subset(MyData, extract=Intensidad)

I expect extract an object who let me calculate

MrFlick
  • 195,160
  • 17
  • 277
  • 295
  • 2
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick May 16 '23 at 19:54
  • Maybe try: `MyData[, "Intensidad" ]` or `MyData[, grep("Intensidad", colnames(MyData), value = TRUE) ]` – zx8754 May 16 '23 at 20:17

0 Answers0