Re: [R] What does rbind(iris[,,1], iris[,,2], iris[,,3]) do?

2006-04-13 Thread Prof Brian Ripley
'iris' in S-PLUS is not the same as 'iris' in R, rather similar to 'iris3' 
in R.

You need the fourth (2002) edition of the book to work with R.

The book does say in many places (including its title) it is about 
'S-PLUS', but does have on-line complements about the changes needed for R 
of a similar vintage (last updated Dec 2001).

You are trying to use a book written in 1998 on a different system in 
2006, and you have the audacity to accuse the authors of making errors
because it does not work.  I look forwards to receiving your apology.


On Thu, 13 Apr 2006, Sasha Pustota wrote:

 It's in the Venables  Ripley MASS (ed 3) book in the section on
 principal components.
 The context is as follows

 ir - rbind(iris[,,1], iris[,,2], iris[,,3])
 ir.species - factor(c(rep(s,50),rep(c,50),rep(v,50)))
 (then they use brush(ir) which I guess is not an R function)

 and then

 princomp(log(ir[1:4]),cor=T)
 (there is no [1:4] in the text which is probably a typo)

No, just your error.

 From what I can see,

 iris[,,1]

 is the same as

 iris

 and rbind(iris[,,1], iris[,,2], iris[,,3]) duplicates iris 3 times
 while mangling the row index. What happens to the index and what is
 the purpose of that?

 I also seem to get the same result with rbind(iris[,,1], iris[,,1],
 iris[,,1]). What is the difference with rbind(iris[,,1], iris[,,2],
 iris[,,3])?

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] What does rbind(iris[,,1], iris[,,2], iris[,,3]) do?

2006-04-13 Thread Gabor Grothendieck
What you are referring to iris is called iris3 in R so just replace
iris with iris3.   iris3 is a 3d array in R whereas iris is a data frame.

On 4/13/06, Sasha Pustota [EMAIL PROTECTED] wrote:
 It's in the Venables  Ripley MASS (ed 3) book in the section on
 principal components.
 The context is as follows

  ir - rbind(iris[,,1], iris[,,2], iris[,,3])
  ir.species - factor(c(rep(s,50),rep(c,50),rep(v,50)))
 (then they use brush(ir) which I guess is not an R function)

 and then

  princomp(log(ir[1:4]),cor=T)
 (there is no [1:4] in the text which is probably a typo)

 From what I can see,

  iris[,,1]

 is the same as

  iris

 and rbind(iris[,,1], iris[,,2], iris[,,3]) duplicates iris 3 times
 while mangling the row index. What happens to the index and what is
 the purpose of that?

 I also seem to get the same result with rbind(iris[,,1], iris[,,1],
 iris[,,1]). What is the difference with rbind(iris[,,1], iris[,,2],
 iris[,,3])?

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] What does rbind(iris[,,1], iris[,,2], iris[,,3]) do?

2006-04-13 Thread François Pinard
[Gabor Grothendieck]
What you are referring to iris is called iris3 in R so just replace
iris with iris3.   iris3 is a 3d array in R whereas iris is a data frame.

Thanks for this calm and simple reply.  Some could learn from you! :-)

-- 
François Pinard   http://pinard.progiciels-bpi.ca

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] What does rbind(iris[,,1], iris[,,2], iris[,,3]) do?

2006-04-13 Thread Sasha Pustota
Brian Ripley [EMAIL PROTECTED] wrote:
 'iris' in S-PLUS is not the same as 'iris' in R, rather similar to 'iris3'
 in R.

Thank you! This answered all my questions.

 You need the fourth (2002) edition of the book to work with R.

 The book does say in many places (including its title) it is about
 'S-PLUS', but does have on-line complements about the changes needed for R
 of a similar vintage (last updated Dec 2001).

 You are trying to use a book written in 1998 on a different system in
 2006, and you have the audacity to accuse the authors of making errors
 because it does not work.  I look forwards to receiving your apology.

I apologize for supposing that iris is the same in R and Splus (I did
check the index of the book for iris but I should have looked
elsewhere) as well as for supposing that the omission of [1:4] was
probably a typo. My intention was to get help with understanding and
not for a moment was I thinking of accusing the authors of anything.

S

 On Thu, 13 Apr 2006, Sasha Pustota wrote:

  It's in the Venables  Ripley MASS (ed 3) book in the section on
  principal components.
  The context is as follows
 
  ir - rbind(iris[,,1], iris[,,2], iris[,,3])
  ir.species - factor(c(rep(s,50),rep(c,50),rep(v,50)))
  (then they use brush(ir) which I guess is not an R function)
 
  and then
 
  princomp(log(ir[1:4]),cor=T)
  (there is no [1:4] in the text which is probably a typo)

 No, just your error.

  From what I can see,
 
  iris[,,1]
 
  is the same as
 
  iris
 
  and rbind(iris[,,1], iris[,,2], iris[,,3]) duplicates iris 3 times
  while mangling the row index. What happens to the index and what is
  the purpose of that?
 
  I also seem to get the same result with rbind(iris[,,1], iris[,,1],
  iris[,,1]). What is the difference with rbind(iris[,,1], iris[,,2],
  iris[,,3])?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html