Kaz's SAS, HLM, and Rasch Model
SAS Character Function
Home
Large National Data Sets
Kaz Library
SAS manuals
What is "error"?
Rasch Model
HLM
SAS PROC NLMIXED and GLIMMIX
Factor Analysis
Reading output via SAS
Excel functions for Statistical Analysis
Essays on learning statistics
Statistics in Japanese
My profile
My SAS questions and SAS's responses
My work tool box

Modify content of character variables using functions

  • eachline2=TRANWRD(eachline,"'","^")  ;
  • newvalue =tranwrd(record,"ABC",""); THIS DELETES ABC OFF A VARIABLE VALUE.

  • header1=substr(eachline,1,1);
  • newper3=put(newper,5.1); Creating % such that 0.0 or 1.0 stays 0.0 or 1.0 (instead of becoming 0 or 1 with no trailing zeros.)
  • x=index(variablename,"slope");
  • x=indexc(NEW,"^");

  • Remove excess spaces from a string variable (I found this info at http://www.ats.ucla.edu/stat/sas/faq/get_rid_of_extra_spacing.htm):

coal_name_legacy=NAME||Address||state;

  rid = prxparse('s/\s+/ /');
  call prxchange(rid, -1, coal_name_legacy);
  drop rid;

Copyright 2005 KU
For information inquiry (AT) estat.us