Exercise_Week11_Answer - MATH2871 DATA MANAGEMENT FOR...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH2871 DATA MANAGEMENT FOR STATISTICAL ANALYSIS SEMESTER 2, 2010 Lab exercise Week 11 1. Extracting Characters Based on Position The data set orion.newcompetitors has data on competing retail stores that recently opened near existing Orion Start locations. a. Orion Star would like a data set containing only the small retail stores from these observations. Create a new variable, Country , that contains the first two characters of ID . Create a new variable , Store_Code , that contains the other characters from the value in ID . Left justify the value so that there are no leading blacks. The first character in the value of Store_Code indicates the size of the store, and 1 is the code for a small retail store. Write a program to output only the small retail store observations. Make sure that the City values appear in proper case. b. Display the columns Store_Code, Country, City, and Postal_Code. New Small-Store Competitors Store_ Postal_ Code Country City Code 15301W AU Perth 6002 12217E AU Sydney 2000 150 CA Toronto M5V 3C6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/12/2011 for the course ASB 1001,2522, taught by Professor Nicole during the One '09 term at University of New South Wales.

Page1 / 3

Exercise_Week11_Answer - MATH2871 DATA MANAGEMENT FOR...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online