Greetings, I'm seeking a mentor proficient in SAS who can guide me through the intricacies of the software over the next 3-5 months. I'm enthusiastic about learning, a quick learner, and prefer remote instruction.
... View more
There have been quite a few spam questions over the past few months where it took sometimes days until they got removed.
Proposal
Implement an automated process that moves questions from the visible list to some hidden queue for investigation if marked by multiple users an inappropriate content.
To avoid that this process can get misused: Only include users that marked the question if they are not New Users but already on a certain level (to exclude fake users).
And just thinking:
Eventually request from New Users for their first few post some additional identification step when posting a question to make it a bit harder to automate posting such questions.
... View more
Two Identical Table one at work lib and another in sql sever - One getting generated thru SAS process @ Work Library and based on that I would like to simply update the SQL Server table. What is the best way to do so ?
I have 100+ columns in Work lib table and same in SQL server table.
I have library with SQL Server.
... View more
Hello SAS community,
I have variables with the following
original format
proc format;
value s 0 ="Never/almost Never" 1 ="Once in a while" 2 ="Some days" 3 ="Most days" 4 ="Everyday" 5 ="Many times/day" . ="Unknown";
I'm now being asked to do reverse formatting for a bunch of variables
/*1 = many times a day, 2 = every day, 3 = most days, 4 = some days, 5 = once in a while, 6 = never*/
data have;
input id strngth peace beauty prscnc union love;
cards;
1 0 1 2 3 4 5
2 4 0 0 1 3 4
3 4 2 3 2 5 0
4 2 4 4 0 2 3
5 0 3 5 0 0 1
6 3 5 1 4 3 4
7 5 2 3 2 1 0
8 3 2 2 5 2 1
9 5 1 3 2 1 0
10 4 0 0 1 3 4
11 0 2 3 2 5 0
12 2 4 4 0 2 3
;
run;
data have2;
set have;
format strngth peace beauty prscnc union love s.;
run;
proc freq data=have2;
title 'orig';
tables strngth / list missing;
run;
proc format;
value sr
6 ="Never/almost Never"
5 ="Once in a while"
4 ="Some days"
3 ="Most days"
2 ="Everyday"
1 ="Many times/day"
. ="Unknown";
run;
data want;
set have2;
if strngth = 5 then strngth2 = 1; else
if strngth = 4 then strngth2 = 2; else
if strngth = 3 then strngth2 = 3; else
if strngth = 2 then strngth2 = 4; else
if strngth = 1 then strngth2 = 5; else
if strngth = 0 then strngth2 = 6; else
strngth2 = .;
format strngth2 sr.;
run;
but I'm getting the following for recoded - unable to copy in both tables:
original
strngth
Frequency
Percent
Cumulative Frequency
Cumulative Percent
Never/almost Never
3
25.00
3
25.00
Some days
2
16.67
5
41.67
Most days
2
16.67
7
58.33
Everyday
3
25.00
10
83.33
Many times/day
2
16.67
12
100.00
recoded
strngth2
Frequency
Percent
Cumulative Frequency
Cumulative Percent
Many times/day
2
16.67
2
16.67
Everyday
3
25.00
5
41.67
Most days
2
16.67
7
58.33
Some days
2
16.67
9
75.00
Never/almost Never
3
25.00
12
100.00
I would like to be able to-
correctly apply the correct format to the recoded variable - I also need to keep the original format
do this efficiently for a bunch of variables
Thanks,
Maggie
... View more