s-news
[Top] [All Lists]

Creating more than two level factor variables

To: s-news@wubios.wustl.edu
Subject: Creating more than two level factor variables
From: Carlos Davidson <cdavidson@csus.edu>
Date: Tue, 31 Aug 2004 15:40:37 -0700
Splus-list,

I would like to create a four level factor variable from two binary factor variables. So for a dataset with 1000 plus sites I have information on two different categorical binary variables (fish present - yes/no, and lake depth deep/shallow) and I would like to create a single factor variable with the factors "fishshallow","fishdeep", "nofishdeep","nofishshallow". Any suggestions of code to do this - call my two binary variales fish ( values "Y" and "N") and depth (values "Deep","Shallow")?

Thank you!

Carlos

_______________________________________________________

Carlos Davidson

Dept of Environmental Studies
California State University, Sacramento
6000 J Street
Sacramento, CA 95819-6001

Email: cdavidson@csus.edu
Phone: (916) 278-6063
Fax: (916) 278-7582
Web site: www.csus.edu/indiv/d/davidsonc

<Prev in Thread] Current Thread [Next in Thread>