User talk:ArtCarpenter

From sasCommunity
Jump to: navigation, search

Wiki Tips Discussions:

Demo to show an Underline in linked text.
The References section found in the back of the book has been uploaded as a PDF file.



data future_holidays;
label year = "Year"
      mothersday= "Mothers Day"
      presidentsday = "Presidents Day"
      victoriaday = "Victoria Day"
;
format mothersday presidentsday victoriaday worddate.;
do year = 2009 to 2019 by 1;
   mothersday = holiday("MOTHERS",year);
   presidentsday=holiday("USPRESIDENTS",year);
   victoriaday=holiday("VICTORIA",year);
   output;
end;
run;
 
proc print label;
run;

Demo for the use of SAS code on the WIKI
You can show SAS code as it appears in the editor. Use the source lang=sas tag
<div style="float:right"><source lang="sas"> .... </source></div>

In this example the code is placed before this text which is therefore displayed to the left of the code. Had the code followed the text, the code would appear below and to the right of this text.

Sandbox

The following will create and display the QR code pointing to the logon user's papers and presentations page. {{Display_Papers_and_Presentations_QRCode}} </br>

The result will look something like this (for your page):
QR Code for this page
  ArtCarpenter Papers and Presentations QR Code.png

Adding category divisions to the author presentations page use: {{MyPapersDPL}} {{MyPapersDPLByCategory|FCMP Procedure}}


* Cute SQL Code;
data class;
set sashelp.class(rename=(age=_age));
age=put(_age,2.);
drop _age;
run;
proc sql noprint;
create table all as
select name, age, height from sashelp.class
union all
select name, input(_age,2.) as age, input(_age,2.) as height  from class(rename=(age=_age))
union all
select  name, age, weight from sashelp.class
;
quit;
proc print data=all;
run

Link to MediaWiki Help:Redirects

Thanks for adding the link to the MediaWiki public domain help page for redirects on sasCommunity:Titles and correcting all my typo's too. - Cameron (talk) 20:56, 11 May 2014 (CDT)

You bet. The way I see it you did all the real work. :-) --Art Carpenter (talk) 00:43, 12 May 2014 (CDT)

Correcting wikilinks

Hi ArtCarpenter,

I notice you have been "correcting" some of the wiki links I have been creating for articles that don't yet exist. For example: I notice that in the article Legend for Proc Univariate Using Annotate you changed the link I had to an article for UNIVARIATE procedure into a link to :Category:UNIVARIATE Procedure. I noticed it again in changes you made to the article Missing Values in Classification Variables. Is there a reason for this? Am I doing something wrong? Why should links go to the Category page rather than an article page in the main namespace? I would have thought that if the article in the main namespace exists, one should go there. One should only go to the corresponding Category page if no article exists. Even so, wouldn't it be easier to create a redirect page instead, like the one for REPORT procedure? Then the page would direct all links to that name to the category page, without you needing to change each link individually. The redirect page could serve as a placeholder for a future article, too. In the mean time, the Wanted Pages special page would list the most wanted articles before a redirect or article was created. - Cameron (talk) 19:47, 23 March 2015 (CDT)

Cameron, The chances of you doing something wrong are pretty unlikely. Your wiki sophistication is far and away better than mine. I assumed that the category would be where one should want to go especially since the article did not already exist. But I see your point and your reasoning. I remain but a padawan learner. --Art Carpenter (talk) 22:47, 23 March 2015 (CDT)
Art, I think we are all padawan learners in some respects. Also "to err is human". Where I have erred is by not previously communicating my ideas about wiki linking, so that others can benefit from my knowledge. - Cameron (talk) 03:48, 29 March 2015 (CDT)

The Axis Statement: Your Ally for Controlling Graphic Text

Hi Art, I recently came across this paper, and since it didn't have a page, I created The Axis Statement: Your Ally for Controlling Graphic Text. I hope you don't mind that I created the page for you. Feel free to edit, of course. - paulkaefer (talk) 13:35, 23 May 2016 (CDT)

Thanks Paul. I appreciate the help. I have been slowly trying to catch up on some of my older papers.--Art Carpenter (talk) 15:22, 24 May 2016 (CDT)

Internal Links

When writing text if there is a phrase that indicates a page or category enclose it in double square brackets. Such as:
Use a [[%LET statement]] to create a macro variable.
The enclosed text becomes an internal link, even when the capitalization is not exact.
Use a %LET statement to create a macro variable.

missing "secret sequel" text file

Hi Art, I noticed that on Secret Sequel: Keeping Your Password Away from the LOG, there's a link to a missing text file, File:SGF-013-2009.txt. Maybe it's unnecessary, since an interested reader can probably (it appears to me) get the code from the paper. In which case, the line "Download examples and code as plain txt." can be removed. But if you have a copy of this file, would you be able to upload it? - paulkaefer (talk) 14:36, 2 August 2016 (CDT)

Done thanks for catching this. --Art Carpenter (talk) 18:31, 2 August 2016 (CDT)

minor error on What's New

Hi Art, I was reading the info on MWSUG on the front page, and saw there's an extra ] after the Register Today! link. I don't have admin rights to edit it, so I figured I would let you know. - paulkaefer (talk) 09:38, 8 September 2016 (CDT)

Thanks Paul. Got it --Art Carpenter (talk) 21:37, 15 September 2016 (CDT)

TS-486

Hi Art, I saw your recent edits. The tech support document PDF is archived here, if that's useful. Cool to see that sasCommunity.org serves another purpose of maintaining documentation that SAS.com obsoletes. - paulkaefer (talk) 13:22, 27 December 2016 (CST)

Thanks for the link to TS486. I will add that back in.--Art Carpenter (talk) 13:38, 27 December 2016 (CST)

What's New error

Hi Art, I noticed in this edit that there should be a space between the URL and "more" ... so the link on the front page doesn't work. Regards. - paulkaefer (talk) 09:56, 11 January 2017 (CST)

Good catch. Thanks Paul. --Art Carpenter (talk) 10:05, 11 January 2017 (CST)

Code Clinic

DATA Step Input

I am not getting my table in the right order and some observations are missing in the the results window.

Data demo_10;
	Length= id $10. Firstname $25. Lastname $20. dob $8. gender $1. Employment Status $1. Income $8.Family Size $8. Phone number $10.;
	input id $ firstname $ Lastname $ dob ddmmyy9.gender $Employment Status $ Income  Famaily size Phone number;
	format dob ddmmyy9. 1=Yes(employed) 0=No (unemployed);
Datalines;
0000000001 Bob  Jones 01/06/67   M 1    45000  6  4164663377
0000000002 Alex Red   02/08/77   M 1    10000  2  6472226756
0000000003 Kim  Fan   05/05/75   M 0    89000  4  6471123399
0000000004 Herb Shaw  08/04/79   M 1    60000  2  4163443456
0000000005 Tim Yen    07/02/78   F 0    50000  3  4165446265
0000000006 Allan Den  09/07/68   M 0    30000  2  4164763567
0000000007 Toby Gibb  08/06/90   M 1    36000  3  6473445467
0000000008 Dail Ang   07/08/89   F 1    46000  4  6473556789
0000000009 Jon  Jen   02/06/76   F 1    56000  3  6472337876
0000000010 Dave Koz   09/07/89   M 1    34000  4  4163448787
 
;
Run;
 
proc print data =demo_10;
run;

You have a good start. i will mention a few things and you can then rewrite and resubmit it here.

  1. Having the LENGTH statement before the INPUT is fine, but the equal sign is not used.
  2. the variable lengths in the LENGTH statement do not use a period (.). They are not formats.
  3. Variable names cannot have embedded blanks. Either remove the blanks or use an underscore (_).
  4. When using an informat with list style input precede the format with a colon as in :ddmmyy8.
  5. The FORMAT statement is used to assign an existing format. Use PROC FORMAT to create a user defined format.
  6. There is a blank data line in the DATALINES section of your DATA step. This will give you missing values.