Notes2 - name $10. status $11. ; input Name $ bp Gen $...

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

View Full Document Right Arrow Icon
today Character vs numeric variables Length of variables Labels Comments Title(s)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Character variables data three; input Name $ Age weight; datalines ; John 21 120 Mike 19 160 Lisa 16 155 Ray 23 489 Lebronjones 45 132 ; run; Dollar sign
Background image of page 2
Length of variables data three; length Name $12.; input Name $ Age weight ; datalines; John 21 120 Mike 19 160 Lisa 16 155 Ray 23 489 Lebronjones 45 132 ; run; The longest entry in variable ‘name’ has length 11. Assign length of atleast 11 characters!
Background image of page 3

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

View Full DocumentRight Arrow Icon
label data four; length Name $12.; input Name $ Age weight bp; Label bp = “ Blood Pressure” ; datalines; Anah 32 160 200 Kobe 65 246 300 Lebronjones 45 132 279 ; run; Proc print data = four label; Run ; quit; Single or double quotes is fine! For your label to appear in print out
Background image of page 4
You can assign length to and/or label your variables all at once as shown below: length
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: name $10. status $11. ; input Name $ bp Gen $ status $ age ; label bp = 'systolic blood pressure' gen = ' Gender' status = 'Marital Status ; datalines ; . . . ; Run; Comments /* Name: */ /* Statistics Methods : section I */ /* Project: Lab # 1 */ /* Date: */ Data project; length name $12. ; input Name $ age weight bp; label bp = Blood Pressure; /* labeling my variables */ datalines; Anah 32 160 200 Kobe 65 246 300 Lebronjones 45 132 279 ; run; Titles /* Name: */ /* Statistics Methods */ /* Project: Lab # 1 */ /* Date: */ Title1 Your Name ; Title2 Homework 1 ; Data project; input Name $ age weight bp ; label bp = Blood Pressure /* labeling my variables */ datalines; Anah 32 160 200 Kobe 65 246 300 Lebronjones 45 132 279 ; run;...
View Full Document

Page1 / 7

Notes2 - name $10. status $11. ; input Name $ bp Gen $...

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

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