I have a multitude of dataframes in R that are like this & I know how to modify an entire column.
id fire earth water
1 5 7 9
2 23 34 54
3 1 2 3
df$fire <- (df$fire-5.5)/4.5
Im having a hard time finding the specific syntax to refer to this specific column but of every df (lets say fire)
df.list <- list(df1,df2,df3)
fire_function <- function(){(.$fire-5.5)/4.5}
lapply(df.list, fire_function)
Sorry if this question was already asked, i searched and couldn't find how to refer a specific column of all dataframes. Maybe my apply function is not appropriate either.
thank you