Re: [R] Hidden information in an object

2013-03-01 Thread Rui Barradas
Hello, Inline. Em 28-02-2013 12:50, Rasmus Hedegaard escreveu: Hello, The dataset "cats" contain information about the heart weight ("Hwt"), body weight ("Bwt") and gender ("Sex") of a group of 144 cats. I write the following piece of code: library(MASS)attach(cats)ratio <- Hwt/Bwtmale <-

Re: [R] Hidden information in an object

2013-02-28 Thread David L Carlson
thropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Rasmus Hedegaard > Sent: Thursday, February 28, 2013 6:51 AM > To: r-help@r-project.org > Subject

Re: [R] Hidden information in an object

2013-02-28 Thread Ista Zahn
Hi Rasmus, Things will be much less confusing if you don't use attach. I know that sounds flippent, but I'm quite serious. Best, Ista On Thu, Feb 28, 2013 at 7:50 AM, Rasmus Hedegaard wrote: > > > > > Hello, The dataset "cats" contain information about the heart weight ("Hwt"), > body weight (

[R] Hidden information in an object

2013-02-28 Thread Rasmus Hedegaard
Hello, The dataset "cats" contain information about the heart weight ("Hwt"), body weight ("Bwt") and gender ("Sex") of a group of 144 cats. I write the following piece of code: library(MASS)attach(cats)ratio <- Hwt/Bwtmale <- ratio[Sex == "M"]female <- ratio[Sex == "F"] My question is, when