Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
複数の行列に関数を適用したいのですが、出力は各操作の結果を報告するリストまたはベクトルである必要があります。だから私の試みはmapplyで、次のようになりました:
myfunction<-function(x){cor(df1,x) output.list<-mapply(myfunction(df2,df3))
しかし、これはうまくいきませんでした。何か案は??
これを試してくださいlapply(list(df2, df3), myfunction)。
lapply(list(df2, df3), myfunction)