# Subset

## Main.Subset History

November 21, 2011, at 01:25 PM by Amelia -
Changed line 17 from:

Note that to create a subset on non-numeric variables (e.g., type) the values of the variable must be enclosed with quotation marks (e.g., type == “none”).

to:

Note that to create a subset on non-numeric variables (e.g., type) the values of the variable must be enclosed with quotation marks (e.g., `type == “none”`).

November 21, 2011, at 01:25 PM by Amelia -
Changed lines 13-15 from:

Enter the expression for the desired subset in the Subset Expression space.

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed below. In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

to:

Enter the expression for the desired subset in the Subset Expression space. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed below. In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

November 21, 2011, at 01:24 PM by Amelia -
Changed lines 15-19 from:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed below.

In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

to:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed below. In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

Deleted line 17:
November 21, 2011, at 01:24 PM by Amelia -
Changed lines 15-16 from:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed in the section.

to:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed below.

Changed line 25 from:

to:

## Common logical operations

November 21, 2011, at 01:23 PM by Amelia -
Changed line 15 from:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed in the #Common logical operations section.

to:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed in the section.

November 21, 2011, at 01:22 PM by Amelia -
Changed lines 15-26 from:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are:

to:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are listed in the #Common logical operations section.

In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

After you have entered your subset expression, include a name for the subset in the Subset Name: space. Deducer will automatically provide a name if one is not supplied. Click OK. The subset will appear as a new entry in the pull down menu of the Data Viewer. (The original data remains unchanged.)

Note that to create a subset on non-numeric variables (e.g., type) the values of the variable must be enclosed with quotation marks (e.g., type == “none”).

## Common logical operations

Deleted lines 38-45:

In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

Note that to create a subset on non-numeric variables (e.g., type) the values of the variable must be enclosed with quotation marks (e.g., type == “none”). Include a name for the subset in the Subset Name: space. Deducer will automatically provide a name if one is not supplied. Click OK. The subset will appear as a new entry in the pull down menu of the Data Viewer. (The original data remains unchanged.)

November 21, 2011, at 01:20 PM by Amelia -

In the example above, the subset was those cars whose miles per gallon were less than or equal to 20 mpg.

November 21, 2011, at 01:19 PM by Amelia -
Changed line 15 from:

The subset expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are:

to:

The Subset Expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are:

November 21, 2011, at 01:19 PM by Amelia -
Changed lines 7-9 from:

To subset data, choose Subset from the Data menu on the menu bar on the Console window.

to:

To subset data, choose Subset from the Data menu on the menu bar on the Console window. The following window will appear.

Choose the data set from which to create a subset. In this example, the data frame is `mtcars`. Other open files can be chosen from the pull down menu.

Enter the expression for the desired subset in the Subset Expression space.

Changed lines 29-33 from:
to:

Note that to create a subset on non-numeric variables (e.g., type) the values of the variable must be enclosed with quotation marks (e.g., type == “none”). Include a name for the subset in the Subset Name: space. Deducer will automatically provide a name if one is not supplied. Click OK. The subset will appear as a new entry in the pull down menu of the Data Viewer. (The original data remains unchanged.)

November 21, 2011, at 01:17 PM by Amelia -

To subset data, choose Subset from the Data menu on the menu bar on the Console window.

August 04, 2009, at 05:14 PM by 132.239.102.171 -
Changed line 16 from:
 & mpg<=20 & cyl==6 Select observations with mpg less than or equal to 20 and cyl not equal to 6
to:
 & mpg<=20 & cyl==6 Select observations with mpg less than or equal to 20 and cyl equal to 6
August 02, 2009, at 12:22 AM by 132.239.1.231 -
Changed lines 21-25 from:
to:

## R Code

`mtcars.guzzle<-subset(mtcars,mpg <= 20)`

August 02, 2009, at 12:21 AM by 132.239.1.231 -
Changed line 17 from:
 |cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
to:
 `|` cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
August 02, 2009, at 12:20 AM by 132.239.1.231 -
Changed line 17 from:
 cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
to:
 |cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
August 02, 2009, at 12:20 AM by 132.239.1.231 -
Changed line 17 from:
 |cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
to:
 cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6
Changed line 19 from:
 Select observations with non-missing cyl values
to:
 `!` `!is.na(cyl)` Select observations with non-missing cyl values
August 02, 2009, at 12:19 AM by 132.239.1.231 -
Changed line 15 from:
 \!= cyl!=6 Select observations with cyl not equal to 6
to:
 `!=` cyl!=6 Select observations with cyl not equal to 6
August 02, 2009, at 12:17 AM by 132.239.1.231 -
Changed line 15 from:
= cyl!=6 Select observations with cyl not equal to 6
to:
 \!= cyl!=6 Select observations with cyl not equal to 6
August 02, 2009, at 12:17 AM by 132.239.1.231 -
Changed lines 7-8 from:

The subset expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions.

to:

The subset expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions. Some common ones are:

Changed lines 9-10 from:
 Operator Example meaning <= mpg<=20 select observations with mpg less than or equal to 20
to:
= Operator Example Meaning <= mpg<=20 Select observations with mpg less than or equal to 20 >= mpg>=20 Select observations with mpg greater than or equal to 20 < mpg<20 Select observations with mpg less than 20 > mpg>20 Select observations with mpg greater than 20 == cyl==6 Select observations with cyl equal to 6 cyl!=6 Select observations with cyl not equal to 6 & mpg<=20 & cyl==6 Select observations with mpg less than or equal to 20 and cyl not equal to 6 |cyl==4 | cyl==6 Select observations with cyl equal to 4 or 6 is.na is.na(cyl) Select observations with missing cyl values Select observations with non-missing cyl values
August 02, 2009, at 12:11 AM by 132.239.1.231 -

The subset expression field allows the definition of the subset. Subset expressions may be formed with any combination of logical comparison operators and functions.

 Operator Example meaning <= mpg<=20 select observations with mpg less than or equal to 20
August 02, 2009, at 12:05 AM by 132.239.1.231 -
Changed lines 1-7 from:

create subset

to:

## Description

Creates a new data frame that is a subset.

## Dialog

July 26, 2009, at 06:22 PM by 132.239.1.231 -