select_first_CCAPS: Select each client's first administration of a specified...

View source: R/select_first_CCAPS.R

select_first_CCAPSR Documentation

Select each client's first administration of a specified survey

Description

Select each client's first administration of a specified survey

Usage

select_first_CCAPS(
  data,
  order_by = "Date",
  keep_all = FALSE,
  keep_columns = c("UniqueClientID", "CcmhID", "Depression34", "Anxiety34",
    "Social_Anxiety34", "Academics34", "Eating34", "Hostility34", "Alcohol34", "DI",
    "Depression62", "Eating62", "Substance62", "Anxiety62", "Hostility62",
    "Social_Anxiety62", "Family62", "Academics62")
)

select_first_SDS(
  data,
  order_by = "Date",
  keep_all = FALSE,
  keep_columns = "SDS"
)

select_first_CLICC(
  data,
  order_by = "Date",
  keep_all = FALSE,
  keep_columns = "CLICC"
)

Arguments

data

data frame

order_by

variable to order by when selecting the first administration.

keep_all

Columns to keep. TRUE will keep all columns, while FALSE will keep only IDs and CCAPS subscales, SDS items, or CLICC items.

keep_columns

A string list of column names to retain. If not specified, and keep_all = FALSE, defaults to the relevent columns for that data form.


jpetrovich02/CCMHr documentation built on Jan. 25, 2024, 11:57 p.m.