Skip to content

Can't understand syntax

1 message · Rui Barradas

#
Hello,

Thank you, I'm gald it helped. Two notes.

1. I don't believe 1t's a problem with the documentation, though many 
times, and R is not an exception, there are books that explain in 
simpler terms what the docs alreay explain well. Check out the 
"contributed" link in http://cran.r-project.org/
(it's on the left, bottom-most). There are several books that though 
have specific areas, start with an introduction to R.

2. You've missinterpreted a point in my post, data.frames are list. 
Stricktly speakng they are also, like any other list, collections of 
list, but that's NOT the way they should be seen. It's more natural to 
see them as implementing the statistical concepts of variables and 
observations. In this case a column is a variable/vector (not list) and 
  whithin a vector, we have observations. In the general case  variables 
need not have the same number of observations; if they do, the list can 
become tabular, a data.frame. And we can speak of rows.

Rule: call the columns variables and call the rows observations or, 
well, or columns and rows. But think of the columns as vectors.

Like I've said above, a column is still a list, and can hold any type of 
data. Some questions are about keeping entire matrices as elements of a 
data.frame column, but the answer is "yes, it is possible but NO, don't 
do that".

Em 15-07-2012 16:05, Charles Stangor escreveu: