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.
hello, I want to find the first record: the value is 1 and lasted 24 hours, like my picture: in obs 1,the value is 1 and the record after 24h is obs 4,but between these two records is a record with AVALCN=0,so obs 1 is N; in obs 2 ,the value is 1 and the record after 24h is obs 5,but between these two records is a record with AVALCN=0,so obs 2 is N; in obs 3,AVALCN=0 ,,so obs 2 is N; in obs 4,,the value is 1 and the record after 24h is obs 6,the value between these two records is 1 ,so obs 4 is Y; in obs 5,the value is 1 ,no records were obtained after 24h,so obs 5 is N;
... View more
Esteemed Advisors:
I am trying to interleave two datasets with a condition that the resulting dataset contains only observations that can be found in both of the two datasets.
Below is exemplar code to illustrate the problem. If you run this code and inspect dataset interleave2 you will see that for a group of 3 observations where target=1, two came from Random_A and one came from Random_B. Likewise, for a group of three observations where target=2, two came from Random_B and one came from Random_A. All of these observations need to be retained in the desired dataset.
For the group of 3 observations where target=3, all observations came from Random_B only. These are ones that need to be omitted. All observations for a given target that come from a single source dataset are not to be retained in the desired dataset.
The challenge for me (and now for you) is to come up with the code that will interleave Random_A and Random_B such that the resultant dataset that only contains the groups of targets that are present in both datasets.
Hope this makes sense and thanks for taking a look,
Gene
data Random_A (drop=i);
call streaminit(4786);
do i=1 to 100;
Source="A";
Target=rand("Integer",1,100);
ST=catx('/',Source,Target);
output;
end;
data Random_B (drop=i);
call streaminit(6874);
do i=1 to 150;
Source="B";
Target=rand("Integer",1,100);
ST=catx('/',Source,Target);
output;
end;
Proc sort data=Random_A;
by ST;
run;
Proc sort data=Random_B;
by ST;
run;
data interleave1;
set random_A random_B;
by ST;
run;
proc sort data=interleave1 out=interleave2 nounikey;
by target;
run;
... View more
proc export
data=sashelp.class
outfile="TEST1"
dbms = xlsx replace;
run;
proc export data=sashelp.class
outfile="TEST1"
dbms=xlsx
replace;
run;
I'm trying to append an existing file using Proc export, but it didn't work.
i want this ouput
... View more
Hi, do you guys ever work with Verhoeff check digit algorithm (https://en.wikipedia.org/wiki/Verhoeff_algorithm) with SAS? I am trying to use sas for verhoeff check digit but havent found any script to do so.
... View more