search for: df_1

Displaying 4 results from an estimated 4 matches for "df_1".

Did you mean: df1
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, name...
2006 Mar 09
1
Suppress legend in plotting groupedData
...tell how can I suppress the legend (automatically created) when I plot a groupedData. suppose that I have data farme df_0 which contains the following columns: ID represents the clusters, t represents time of observation, Y: the variable of interest and X a binary covariate. Then: df_1 <- groupedData(Y ~ t | ID) plot(df_1, outer ~X) This gives me the plot (Y ~ t) for each cluster with a legend containing all the clusters. How can I drop the legend? Thanks you very much, Bernard, --------------------------------- [[alternative HTML v...
2013 Apr 25
1
Looping through names of both dataframes and column-names
...s())]for (df in nls) { print(df) for (var in names(get(df))) { print(var) assign(paste0(df,"$",paste0(var,"_cs")),cumsum(get(df)[[var]])) }} ls()[grep("df_",ls())] The code above *almost* works, except that it creates a whole bunch of objects of the form df_1$x_cs,df_1$yx_cs ..... What I want is 5 dataframes, with the $ elements enclosed, as usual. Any help or guidance would be appreciated. Much thanks, Dan [[alternative HTML version deleted]]
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...