Creating an AI Assistant for SAS Viya in 5 steps (@sassoftware/viya-assistantjs) - Part I
Recent Library Articles
Recently in the SAS Community Library: SAS' @kumardeva debunks the myth that developing AI assistants is too hard. He shows you how to use the @sassoftware/viya-assistantjs library to jump start your development.
I'm using SGPANEL, and would like to highlight certain panels that are interesting. I think I just want a way to set the wallcolor for each panel dynamically, is that possible?
Below code will make 3 panels, and all three will have the wallcolor set to yellow:
data have ;
input panelid x y ;
cards ;
1 10 10
1 20 20
2 10 15
2 20 15
3 10 20
3 20 10
;
proc sgpanel data=have ;
panelby panelid/ layout=panel;
styleattrs wallcolor="yellow" ;
series x=x y=y;
run ;
Is there a way I can make only the second panel have a yellow wallcolor?
I tried using a band plot in the background, which came close, but still extended the y-axis even though I set option NOEXTEND. I'm sure I could try other methods for adding a yellow bar in the background of second panel (e.g. REFLINE instead of a BAND), but before I go down that path, wondered if I'm missing an easier way.
My band plot approach:
data want ;
set have ;
if panelid=2 then do ;
lowerband=0 ;
upperband=100 ;
end ;
run ;
proc sgpanel data=want ;
panelby panelid/ layout=panel;
band x=x lower=lowerband upper=upperband /fillattrs=(color=yellow) noextend;
series x=x y=y;
run ;
Returned:
... View more
I'm trying to strip some operators from a string, leaving behind variable names. I'm using the following code which doesn't work. Is there some quoting needed?
%let expression = vara / (varb + varc);
%macro stripsym(string);
%sysfunc(translate(&string,,+-*/()));
%mend stripsym;
%put Output: %stripsym(&expression);
%put Desired: vara varb varc;
... View more
Using the following dataset for illustration:
data test;
input id $ x y;
cards;
a1 1 2
a1 1 4
a1 2 8
a1 2 16
b1 2 2
b1 2 4
b1 2 8
b1 3 16
b1 4 32
;
run;
I'd like to retain all records sharing the lowest values of x by subject id:
id x y
a1 1 2
a1 1 4
b1 2 2
b1 2 4
b1 2 8
There's a simple solution I'm missing -- tried the following code but it didn't work:
data test2;
set test;
by id x;
if first.x;
run;
... View more
Hi, How do I fill color under density curves? Here are my sample data and sgpanel procedure. TIA! /* Sample data */ data mydata; input group $ value; datalines; A 10 A 12 A 13 B 9 B 11 B 14 C 8 C 10 C 11 ; run; /* Creating the panelled density plot */ proc sgpanel data=mydata; panelby group / layout=rowlattice columns=1 novarname; density value; run;
... View more
In this article, we will look at creating custom SAS Viya deployment topologies, realizing your workload placement plan. In doing this we will look at a couple of examples as a way of sharing some configuration specifics of using custom labels and taints.
... View more