0
わかりやすい名前の変数/データフレームの大きなリストがあります。例えば、_big_list = list(runner5_data, runner11_data, runner83_data)
など。関数に渡されるパラメータ値を文字列として渡します。
これらのデータフレームのそれぞれを機能させる関数にダンプするループを実行したいのですが、パラメータ値の名前を取得して新しい列として追加することもできます。私は戻って、新しいリストにそれを返したい終わり。
...
place_holder_list = list()
my_funct = function(data_from_list) {
df$helpme = dQuote(data_from_list) # or something similar?
# so df$helpme = 'iris' or 'mtcars', etc
# do other stuff
return(df)
}
ex_list = list(iris, mtcars)
for (each_df in ex_list){
my_funct(each_df) #help appending to list...new column in df should be iris$helpme = 'iris'
}
どこで 'df'を定義しましたか? – akrun