Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Hi, I am new to SAS and I am trying to input data from the a .txt file. Could someone please help me figure out why the IF-THEN statement only applies to the first row of the data? Thanks! Data: DATA work.condo_ranch;
INFILE '/home/u63748921/SAS 123 Problems/sas123_p13.txt' DSD;
INPUT style $ @;
IF style = 'RANCH' OR style = 'CONDO' THEN INPUT sqfeet bedrooms baths street $ price : dollar10.;
RUN; Output:
... View more
refer to an old post below. i searched , but can't find any sample program. can anyone post a specific link for sample program? thanks. Solved: Nonmem Program - SAS Support Communities
... View more
Hi, I have 2 data sets like below. Data one A 1 A 2 B 1 B 2 Data two A Apple A Peach B Banana I need to join them (Cartesian join), but only join by ID (A and B). This is what I want to get: A 1 Apple A 1 Peach A 2 Apple A 2 Peach B 1 Banana B 2 Banana If I use the below code, proc sql; create table three as select one.* ,two.* from one ,two; quit; What I have got was A 1 Apple A 1 Peach A 1 Banana A 2 Apple A 2 Peach A 2 Banana B 1 Apple B 1 Peach B 1 Banana B 2 Apple B 2 Peach B 2 Banana Is there any way to only join by the ID (A, B)? Thank you very much!
... View more
Howdy!
If I specify a font size in SGPLOT, SAS does not seem to actually produce that font size in ODS PDF. It seems to produce some larger font size. Here's example code.
ods pdf file = "M:\test.pdf";
ods graphics on / reset;
title1 height = 12pt font = 'Arial' 'Title 1';
title2 height = 11pt font = 'Arial' 'Title 2';
title3 height = 10pt font = 'Arial' bold 'Title 3';
footnote1 height = 9pt font = 'Arial' 'Footnote 1';
footnote3 height = 8pt font = 'Arial' 'Footnote 2';
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 9.5pt); run;
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 10pt); run;
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 10.5pt); run;
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 11pt); run;
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 11.5pt); run;
proc sgplot data = sasHelp.class; series x = name y = age; xAxis valueAttrs = (family = 'Arial' size = 12pt); run;
ods pdf close;
Title1 comes out as 13 pt. Title2 as 11.5 pt.
Title3 as 11 pt.
Footnote1 as 9.5 pt.
Footnote2 as 9 pt.
The x-axis tick values come out as 9.5, 11, 11, 11.5, 11.5, and 13 pt. respectively.
If I add noGTitle and noGFootnote to the ODS PDF statement, then the font sizes for the titles and footnotes are correct. It seems the problem is with the graphic procedure itself.
I checked the font sizes by copying the text from the PDF and pasting into Word. I am fairly certain the same happens with ODS RTF; I can't paste the text into Word, but eyeballing it, it looks the same. Attached are the PDF and RTF outputs each way, plus a screenshot of the side-by-side comparison of the two RTF files showing that the font without noGTitle definitely is bigger than the font with noGTitle.
Does anyone else also get this? I tested on a SAS session with no other options, custom configuations, etc. but maybe there's still something set on my machine that is messing it up.
Best regards,
Michael
... View more