search for: df_2

Displaying 2 results from an estimated 2 matches for "df_2".

Did you mean: df2
2023 Mar 14
2
Resultado operación entre dataframes
Buen día estimados, Tengo el siguiente código: df_1 <- data.frame(ana = c(15, 20, 30), maria = c(15,20,30), jose = c(15, 20, 30)) df_2 <- data.frame(nombre = c("jose", "ana", "maria"), valor = c(1,2,3)) # Find the corresponding columns in df_1 based on the values in df_2$nombre cols <- match(df_2$nombre, names(df_1)) # Subtract the values of df_2$valor from the corresponding columns of df_1 df...
2010 Jan 10
2
data frame names in sequence
I've been stuck with this problem for a whole afternoon. It's silly but totally pissed me off. I have a set of data frames with names in a sequence: df_1, df_2, df_3, ..., df_20. Now I want to access each data frame (read or write) in a for loop, in a way something like this: for (i in 1:20) { df_i <- ###### length(which(df_i[,7]==1)) ###### } I tried paste or cat ("df_", i, sep=""). But neither way works. Your help is highl...