'loop through specific dataframe cell
here is my problem: I have n dataframes (df1,df2,df3,df4,dn) from each dataframe, I would like to extract the value of the same cell: [2,3] and store it for later
I though this would work:
for (i in 1:n){
assign(paste0("v",i),get(paste0("df",i,"[2,3]")
}
but get is trying to get an object rather than the value of a cell (giving an error). Is there a function to do what I need?
Many thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
