r - Performing same action on multiple tables in for loop -


This is a very simple version of what I'm trying to do. In short, I make some metrics, which I want to take action like loop in In this example I want to print summaries for each matrix, but I do not know how to reference matrices for the loop. Any help is greatly appreciated:

 For  (i in 1: 3) {x  returns (this string As is evaluating 'DF3'):  

Classroom Mode 1 character character length Class Mode 1 character Character length Class Mode 1 character character

How do I get it back?

V1V 2V3 minimum: 1.0 minimum: 3.0 minimum: 5 first Question: 5.0 First Question: 3.0 First Question: 5 Mean: 6.0 Mean: 4.0 Mean: 7 Mean: 5.6 Mean: 5.2 Mean: 7 Third Quiz: 6.0 Third Question: 7.0 Third Question: 8 Max: 10.0 Max: 9.0 Max: 10 V1 V2V3 Min: 2 Minutes: 1.0 Min: 4.0 1 km First Question: 3.0 First Question: 4.0 Mean: 7 Median 3.0 Mean: 6.0 Mean: 6 Mean: 3.4 Menu: 6.6 Third Quiz: 3.8 3 M.M. Third Question: 9.0 Max: 9 Max: 6.0 Max: 10.0 V1 V2 min: 1.0 minus 5.0 Minimum: 1.0 1 Ckyu.akk 0 First Question 6.0 first principal. 2002.0 Mean: 6.0 Mean: 6.0 Mean 3.0 Meaning: 5.2 Meaning: 6.8 Mean: 2.4 Third Quiz: 3.8.0 Third Question: 7.0 Third Question: 3.0 Max. : 9.0 Max: 10.0 Max: 3.0

Do not use different variables and Paste Your name - Put your items in a list:

  x = map (function (i) matrix (sample (1:10, 15, location = TRUE) , Ncol = 3), 1: 3)  

Then it is trivial to perform a normal operation on them:

  Map (summary, x)  

Map a function in a list. It moves like this


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -