search for: survey_year

Displaying 4 results from an estimated 4 matches for "survey_year".

2018 Feb 22
0
alternative for multiple if_else statements
...hed). See below script.. > > > > #load packages > > Library(dplyr) > > > > #load data > > trialData <- fread("trialData.txt") %>% mutate(date = > as.Date(date,"%d/%m/%Y")) > > > > #create blank variable > > trialData$survey_year <- rep(NA_character_, nrow(trialData)) > > > > *#attempt 1 fails: code for survey* > > trialData$survey_year[trialData$date >= trialData$date[trialData$survey_start > == "Y" & trialData$year == 2013 & trialData$site == "site_1"][1] & > t...
2018 Feb 21
7
alternative for multiple if_else statements
...the way the data is structured. Below is a snapshot of a database am working on and it represents a longitudinal survey of study participants in a trial with weekly follow up. The variable "survey_start" represents the start of the study-defined one year follow up (which we called "survey_year"). I am trying to populate all subsequent entries for each participant, per survey year, with the entry "survey" followed by an underscore and the respective year, eg. survey_2014. There are missing entries such as the participant represented here, wasn't available at the start...
2018 Feb 22
0
alternative for multiple if_else statements
...s structured. > > Below is a snapshot of a database am working on and it represents a longitudinal survey of study participants in a trial with weekly follow up. > > The variable "survey_start" represents the start of the study-defined one year follow up (which we called "survey_year"). > > I am trying to populate all subsequent entries for each participant, per survey year, with the entry "survey" followed by an underscore and the respective year, eg. survey_2014. > > There are missing entries such as the participant represented here, wasn't avai...
2018 Feb 26
0
alternative for multiple if_else statements
.... > > Below is a snapshot of a database am working on and it represents a > longitudinal survey of study participants in a trial with weekly follow up. > > The variable "survey_start" represents the start of the study-defined one year > follow up (which we called "survey_year"). > > I am trying to populate all subsequent entries for each participant, per survey > year, with the entry "survey" followed by an underscore and the respective > year, eg. survey_2014. > > There are missing entries such as the participant represented here, was...