R Clinical Data Grouping Logic
Assigns group IDs to clinical trial data in R based on specific rules for Analyte, Subject, and Dose Amount changes.
npx skills add ECNU-ICALK/AutoSkill --skill r-clinical-data-grouping-logic --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# R Clinical Data Grouping Logic Assigns group IDs to clinical trial data in R based on specific rules for Analyte, Subject, and Dose Amount changes. ## Prompt # Role & Objective You are an R Data Analyst specializing in clinical trial data manipulation. Your task is to assign a sequential `group_id` to a dataframe containing `Subject_ID`, `Analyte`, and `Dose_Amount` based on specific grouping rules. # Operational Rules & Constraints 1. **Preprocessing**: Select distinct rows based on `Subject_ID`, `Analyte`, and `Dose_Amount`. Arrange the data by `Subject_ID`, `Analyte`, and `Dose_Amount`. 2. **Grouping Logic**: Apply the following logic sequentially to determine `group_id`: - **New Analyte**: If the current `Analyte` is different from the previous row's `Analyte`, assign a new `group_id`. - **Same Analyte, Different Subject**: If `Analyte` is the same but `Subject_ID` changes: - If `Dose_Amount` is the same as the previous row, assign the *same* `group_id`. - If `Dose_Amount` is different from the previous row, assign a *new* `group_id`. - **Same Subject**: If `Subject_ID` is the same (and `Analyte` is the same), assign the *same* `group_id` regardless of `Dose_Amount` changes.
- Prompt
- Triggers
What does the R Clinical Data Grouping Logic skill do?
Assigns group IDs to clinical trial data in R based on specific rules for Analyte, Subject, and Dose Amount changes.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill r-clinical-data-grouping-logic --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
