09-17-2024
jtscheirer
Calcite | Level 5
Member since
09-12-2024
- 6 Posts
- 1 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by jtscheirer
Subject Views Posted 3295 09-16-2024 04:40 PM 3299 09-16-2024 04:39 PM 3338 09-16-2024 01:26 PM 3606 09-13-2024 07:55 PM 3626 09-13-2024 07:27 PM 506 09-12-2024 08:03 PM -
Activity Feed for jtscheirer
- Posted Re: Move columns to a specific position on SAS Programming. 09-16-2024 04:40 PM
- Posted Re: Move columns to a specific position on SAS Programming. 09-16-2024 04:39 PM
- Liked Re: Move columns to a specific position for Tom. 09-16-2024 04:39 PM
- Posted Re: Move columns to a specific position on SAS Programming. 09-16-2024 01:26 PM
- Posted Re: Move columns to a specific position on SAS Programming. 09-13-2024 07:55 PM
- Posted Move columns to a specific position on SAS Programming. 09-13-2024 07:27 PM
- Posted How to calculate difference between dates by group on SAS Programming. 09-12-2024 08:03 PM
-
Posts I Liked
Subject Likes Author Latest Post 6
09-16-2024
04:39 PM
"Presented" was the wrong choice of word here. The output they want is the actual dataset so that they can use it for some other purpose. They just asked me for an excel sheet with new columns inserted into specific positions. So that is what I'm trying to do. And I think I've figured out how, based on a couple comments above.
... View more
09-16-2024
01:26 PM
This is just how the client requested the data be presented to them. The newly generated columns would sit next to other columns that were used to calculate them, as well as others that are useful for comparison. So they would be able to compare columns that are next to each other rather than columns that require scrolling across the dataset to compare. Regardless of the actual utility of this, that's just how they asked me to present the data.
... View more
09-13-2024
07:55 PM
It was only taking a long time to run because I wrote an error in the code. So you are correct, it does not take long to run. But typing out 35 column names is still impractical. I simply want to move columns 33-35 to occupy positions 19-21 instead. The structure would stay the same (60,000 rows and 35 columns)
... View more
09-13-2024
07:27 PM
I have a large dataset, with about 60,000 rows and 35 columns. I generated a few calculations, which were appended as columns to the end of the table, but I want them to appear in the middle, next to the columns that were used to produce these calculations. I know I can use RETAIN or PROC SQL to list columns in the order I want them to appear, but that is not practical with this large of a dataset. Is there a shorthand way I can just move a couple of columns from the end to specific positions in the middle without having to list every single column name and generate a new table that takes a while to run? My background is in R, which has the INDEX function that allows users to move columns to a specific position. I'm hoping there is something similar in SAS. Thanks!
... View more
09-12-2024
08:03 PM
Hello, I have data that resembles the below, and need to calculate the average time (in months) between dates in the Event_date column, grouped by Subject_ID. In other words, for each subject in the data, I need to know the average number of months between events relevant to that subject. Each subject has a different number of events that are associated with them. Is there a relatively straightforward way to do this? I know how to do this in R, but I'm relatively new to SAS and haven't been able to figure out a solution just yet. Thanks in advance for any help this community can provide! Subject_ID Event_date 1 Date_1 1 Date_2 1 Date_3 2 Date_1 2 Date_2 3 Date_1 3 Date_2 3 Date_3 3 Date_4 3 Date_5 3 Date_6 4 Date_1 4 Date_2 5 Date_1 5 Date_2 5 Date_3 5 Date_4 6 Date_1 6 Date_2
... View more